:root {
    --bg-color: #000000;
    --text-color: #e4e4e4;
    --accent-color: #ff6b00;
    --card-bg: #1a1b1e;
    --hover-color: #2c2d32;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
  color: white;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -ms-user-select: none; 
	-moz-user-select: none; 
	-webkit-user-select: none; 
	user-select: none; 
}


@font-face {
    font-family: Mad-bold;
    src: url(font/bold.ttf);
}

@font-face {
    font-family: Mad-thin;
    src: url(font/thin.ttf);
}

.works {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    break-inside: avoid;
}

@media (max-width: 768px) {
    .works {
        grid-template-columns: 1fr;
    }
    
    .works-section {
        width: 100% !important;
        padding: 20px !important;
    }
    
    .card {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 15px;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.tech-badge:hover {
    transform: scale(1.03);
}

.tech-badge:active {
    transform: scale(0.98);
    opacity: 0.8;
}

.tech-badge {
    transition: all 0.6s ease;
}

/* Top Bar Styles */
.top-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 100px;
}

.time-widget,
.date-widget,
.weather-widget {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;

}

/* Main Content Styles */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.about-section {
    background: linear-gradient(145deg, 
        rgba(22, 22, 22, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    padding: 30px;
    border-radius: 12px;
    border-width: 1px;
    border-style: solid;
    font-family: Mad-bold;
    border-color: rgba(0, 0, 0, 0.3);
}

.works-section {
    background: linear-gradient(145deg, 
        rgba(22, 22, 22, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    padding: 30px;
    margin-bottom: 20px;
    border-radius: 12px;
    border-width: 1px;
    border-style: solid;
    font-family: Mad-bold;
    border-color: rgba(0, 0, 0, 0.3);
}

.nickname {
    background: linear-gradient(-45deg, #c56b5d, #be2a38, #f87864, #ad434d);
    background-size: 200% 200%;
    animation: gradient 5s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 1000;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    z-index: 49;
}

.avatar-light {
    border-radius: 100%;
    z-index: -999;
    filter: blur(180px);
    animation: float 8s infinite ease-in-out;
}

.tech-stack {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-badge {
    background-color: var(--bg-color);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.9em;
}

.bio p{
    margin-bottom: 30px;
    line-height: 1.8;
    font-family: Mad-thin;
}

.work p{
    line-height: 1.8;
    font-family: Mad-thin;
    padding-bottom: 35px;
}

.works-section img {
  border-radius: 12px;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    background-color: var(--bg-color);
    border: none;
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--hover-color);
}

/* Стили для плашки сортировки */
.parameters {
    background: linear-gradient(145deg, 
        rgba(22, 22, 22, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-width: 1px;
    border-style: solid;
    font-family: Mad-bold;
    border-color: rgba(0, 0, 0, 0.3);
    width: 100%;
}

/* Медиазапрос для мобильных устройств */
@media (max-width: 768px) {
    .parameters {
        order: -1; /* Перемещаем на самый верх */
        width: 100% !important;
        padding: 20px !important;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 30px;
    }

    /* Контейнер с отступом */
    div[style*="padding-right: 5%"] {
        padding-right: 0 !important;
        width: 100%;
    }

    .radio-container {
        flex-direction: column;
        gap: 10px;
    }

    .radio-container label {
        padding: 0.8rem;
        font-size: 1rem;
    }

    .glider-container {
        display: none; /* Скрываем анимацию на мобильных */
    }

    .projects-section h2 {
        font-size: 1.4rem !important;
        text-align: center;
    }

    .project-card {
        padding: 15px !important;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .radio-container label {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .projects-section h2 {
        font-size: 1.3rem !important;
    }

    .project-card {
        font-size: 1rem !important;
    }
}

/* Sidebar Styles */
.sidebar > div {
    background: linear-gradient(145deg, 
        rgba(22, 22, 22, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 100%
    );
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-width: 1px;
    border-style: solid;
    font-family: Mad-bold;
    border-color: rgba(0, 0, 0, 0.3);
}

.project-card,
.view-all {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.project-card {
    background-color: #0000006b !important;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.skill-card {
    background-color: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status {
    font-size: 0.8em;
    padding: 3px 8px;
    border-radius: 12px;
}

.status.active {
    color: #4caf50;
}

.status.progress {
    color: #2196f3;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    padding-bottom: 0px !important;
    color: #666;
    font-size: 0.9em;
}

/* loading screen */

.inset-0 {
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px
}

.z-50 {
    z-index: 50
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
    transition-duration: .15s
}

.duration-300 {
    transition-duration: .3s
}

.flex {
    display: flex
}

.flex-col {
    flex-direction: column
}

.bg-black {
    --tw-bg-opacity: 1;
    background-color: rgb(0 0 0 / var(--tw-bg-opacity))
}

.bg-black\/80 {
    background-color: rgba(0, 0, 0, 0.8)
}

.pointer-events-none {
    pointer-events: none
}



.spinner {
    width: 70.4px;
    height: 70.4px;
    --clr: #e49826;
    --clr-alpha: rgba(201, 108, 37, 0.1);
    animation: spinner 1.6s infinite ease;
    transform-style: preserve-3d;
  }
  
  .spinner > div {
    background-color: var(--clr-alpha);
    height: 100%;
    position: absolute;
    width: 100%;
    border: 3.5px solid var(--clr);
  }
  
  .spinner div:nth-of-type(1) {
    transform: translateZ(-35.2px) rotateY(180deg);
  }
  
  .spinner div:nth-of-type(2) {
    transform: rotateY(-270deg) translateX(50%);
    transform-origin: top right;
  }
  
  .spinner div:nth-of-type(3) {
    transform: rotateY(270deg) translateX(-50%);
    transform-origin: center left;
  }
  
  .spinner div:nth-of-type(4) {
    transform: rotateX(90deg) translateY(-50%);
    transform-origin: top center;
  }
  
  .spinner div:nth-of-type(5) {
    transform: rotateX(-90deg) translateY(50%);
    transform-origin: bottom center;
  }
  
  .spinner div:nth-of-type(6) {
    transform: translateZ(35.2px);
  }
  
  @keyframes spinner {
    0% {
      transform: rotate(45deg) rotateX(-25deg) rotateY(25deg);
    }
  
    50% {
      transform: rotate(45deg) rotateX(-385deg) rotateY(25deg);
    }
  
    100% {
      transform: rotate(45deg) rotateX(-385deg) rotateY(385deg);
    }
  }

/* Мобильная адаптация */
@media (max-width: 768px) {
  .container {
    padding: 15px;
    overflow-x: hidden;
  }

  .profile-img {
    width: 120px;
    height: 120px;
  }

  .main-content {
    padding-left: 5%;
    padding-right: 5%;
  }

  footer p {
    padding-left: 15%;
    padding-right: 15%;
    padding-bottom: 20px;
  }
  
  .action-buttons {
    align-items: center;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  .nickname {
    font-size: 1.6rem !important;
  }

  .tech-stack {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tech-badge {
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .bio {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 10px 0 !important;
  }

  .action-buttons {
    flex-direction: column;
    gap: 12px;
  }

  .action-buttons button {
    width: 100%;
    height: 45px !important;
    padding: 0 15px;
  }

  .action-buttons svg {
    width: 24px !important;
    height: 24px !important;
  }

  .main-content {
    flex-direction: column;
    gap: 30px;
    display: flex;
    flex-wrap: wrap; /* Важно для переноса */
    gap: 30px; /* Отступ между секциями */
  }

  .sidebar {
    width: 100%;
    padding: 0;
  }

  .parameters {
    width: 50%;
    padding: 0;
  }

  .project-card {
    font-size: 1rem !important;
  }

  footer p {
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.4;
  }

  /* Исправление для SVG иконок в заголовках */
  h2 svg {
    width: 28px !important;
    height: 28px !important;
    margin-bottom: -6px !important;
  }

  .main-content {
    flex-direction: column !important; /* Главное изменение */
    display: flex;
    flex-wrap: wrap; /* Важно для переноса */
    gap: 40px; /* Отступ между секциями */
  }

  .sidebar {
    order: 2; /* Перемещаем сайдбар после основного контента */
    width: 100%;
    margin-top: 20px;
  }

  .parameters {
    order: 2; /* Перемещаем сайдбар после основного контента */
    width: 5%;
    margin-top: 20px;
  }

  .about-section {
    order: 1; /* Основной контент остается сверху */
    width: 100%;
  }

  /* Опционально - если используется Grid */
  .main-content {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .profile {
    text-align: center;
  }
  
  .profile-img {
    width: 100px;
    height: 100px;
  }

  h2.ru.active, h2.eng {
    font-size: 1.3rem !important;
  }

  .nickname {
    font-size: 1.4rem !important;
  }

  .tech-badge {
    font-size: 0.85rem;
  }

  .sidebar {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  .projects-section h2,
  .skills-section h2 {
    text-align: center;
    margin-bottom: 15px;
  }
  
  .project-card {
    text-align: center;
    padding: 15px;
  }
}