/* reset default browser styles / сбрасываем стилей браузера по умолчанию */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
/* make body take full height / сделаем так, чтобы тело занимало всю высоту */
body {
    min-height: 800px;
    background: #1a1a2e;
    color: #fff;
    font-family: 'Manrope Regular', 'Segoe UI', sans-serif;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}
/* no link decoration / без подчеркивания ссылки */
a {
    text-decoration: none;
}
/* create fixed background gradient that covers entire viewport / создаем фиксированный фоновый градиент, который покрывает весь видимый участок */
.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}
/* define gradient circle that follows mouse cursor / определяем градиентный круг, который следует за курсором мыши */
.gradient-background::before {
    --size: 0;
    content: '';
    position: absolute;
    left: var(--x); /* getting x  / получение x */
    top: var(--y);  /* and y / и y */
    width: var(--size);  /* getting width / получение ширины */
    height: var(--size); /* and height sizes / и высоты */
    background: radial-gradient(circle closest-side, rgba(204, 220, 255, 0.2), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}
/* show gradient when active class is added / показываем градиент, когда добавлен активный класс */
.gradient-background.active::before {
    --size: 100px;
}
/* main content area that expands to fill available space / основная область содержимого, которая расширяется, чтобы заполнить доступное пространство */
.main-content {
    flex: 1;
}
/* center content with max width and padding / центрируем содержимое с максимальной шириной и отступами */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
}
/* center header content with vertical padding / центрируем содержимое заголовка с вертикальными отступами */
header {
    text-align: center;
    padding: 48px 0;
}
/* style main heading with gradient text effect / стилизуем основной заголовок с эффектом градиентного текста */
h1 {
    font-size: 56px;
    margin-bottom: 16px;
    background: linear-gradient(45deg, #6bb6ff, #a4d3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
/* style subtitle text with muted color and proper spacing / стилизуем текст подзаголовка с приглушенным цветом и правильным интервалом */
.subtitle {
    font-size: 19px;
    color: #a9afc3;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
/* position language switcher at top right of viewport / размещаем переключатель языка в правом верхнем углу видимого участка */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

/* --- styles for time and panel button container / стили для контейнера времени и кнопки панели --- */
.time-panel-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* local time style / стиль локального времени */
#localTime {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 500;
    font-family: monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
}

#panel-link {
text-decoration: none; /* remove underline from the link itself / удаляем подчеркивание из самой ссылки */
}

#panel-link button {
    /* copy styles from .lang-btn / скопируем стили из .lang-btn */
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 15px; /* match the padding of .lang-btn / соответствие отступу .lang-btn */
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#panel-link button:hover {
background: rgba(0, 255, 123, 0.3); /* greenish hover effect / зеленоватый эффект при наведении */
}


/* style language buttons with hover effects / стилизуем кнопки языка с эффектами при наведении */
.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}
/* add hover effect to language buttons / добавляем эффект при наведении к кнопкам языка */
.lang-btn:hover {
    background: rgba(107, 182, 255, 0.3);
}
/* highlight active language button / выделяем активную кнопку языка */
.lang-btn.active {
    background: #6bb6ff;
    box-shadow: 0 0 10px rgba(107, 182, 255, 0.5);
}
/* create grid for project cards - two columns for projects / создаем сетку для карточек проектов - две колонки для проектов */
.projects {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 32px;
    margin: 48px 0;
}
/* style project cards with hover effects / стилизуем карточки проектов с эффектами при наведении */
.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 32px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
/* add lift effect on card hover / добавляем эффект поднятия при наведении на карточку */
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
/* style card headings / стилизуем заголовки карточек */
.card h2 {
    font-size: 29px;
    margin-bottom: 16px;
    color: #6bb6ff;
    font-weight: 600;
    text-align: center;
}
/* style card paragraphs / стилизуем параграфы карточек */
.card p {
    color: #cbd0e7;
    line-height: 1.7;
    font-size: 16px;
    text-align: center;
}
/* weather section styles / стили секции погоды */
.weather-section {
    margin: 48px 0;
}
.weather-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}
.weather-card h2 {
    margin-bottom: 20px;
}
#weather-container {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.weather-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.weather-icon {
    width: 80px;
    height: 80px;
}
.temperature {
    font-size: 32px;
    font-weight: bold;
    color: #6bb6ff;
    margin: 0;
}
.description {
    font-size: 18px;
    margin: 0;
    text-transform: capitalize;
}
.weather-extras {
    font-size: 14px;
    color: #a9afc3;
    margin-top: 5px;
}
#refresh-weather {
    background: rgba(107, 182, 255, 0.2);
    color: #6bb6ff;
    border: 1px solid #6bb6ff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}
#refresh-weather:hover {
    background: rgba(107, 182, 255, 0.3);
    transform: translateY(-2px);
}
/* grid for link items - three columns for links / сетка для элементов ссылок - три колонки для ссылок */
.links {
    display: grid;
    grid-template-columns: 33.33% 33.33% 33.33%;
    gap: 32px;
    margin: 48px 0;
}
/* style link containers / стилизуем контейнеры ссылок */
.link-container {
    display: block;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}
/* add hover effect to link containers / добавить эффект при наведении к контейнерам ссылок */
.link-container:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(107, 182, 255, 0.2);
}
/* style link content / стилизуем содержимое ссылок */
.link-content {
    padding: 32px;
    text-align: center;
}
/* style link icons / стилизуем иконки ссылок */
.link-icon {
    font-size: 40px;
    margin-bottom: 16px;
    color: #6bb6ff;
    display: block;
}
/* style link images / стилизуем изображения ссылок */
.link-image {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: block;
}
/* style link headings / стилизуем заголовки ссылок */
.link-title {
    font-size: 24px;
    margin-bottom: 12px;
    color: white;
    font-weight: 600;
}
/* style link descriptions / стилизуем описания ссылок */
.link-description {
    color: #cbd0e7;
    font-size: 16px;
    line-height: 1.6;
}
/* footer truly at the end of page (screen) / нижний колонтитул по-настоящему в конце страницы (экрана) */
footer {
    text-align: center;
    padding: 32px;
    color: #a9afc3;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}
/* style for smaller screens / стиль для меньших экранов */
@media (max-width: 768px) {
    /* reduce heading size on mobile / уменьшаем размер заголовка на мобильном устройстве */
    h1 {
        font-size: 40px;
    }
    /* stack cards vertically on mobile / размещаем карточки вертикально на мобильном устройстве */
    .projects,
    .links {
        grid-template-columns: 100%;
    }
    .language-switcher {
        top: 10px;
        left: 10px;
        right: auto;
    }
    /* adjust weather card on mobile / настраиваем карточку погоды на мобильном устройстве */
    .weather-card {
        max-width: 100%;
    }
    /* adjust time and panel button container on mobile - align items to start / настраиваем контейнер времени и кнопки панели на мобильном устройстве - выровнять элементы по началу */
    .time-panel-container {
        justify-content: flex-start; /* align items to the left / выравниваем элементы по левому краю */
    }
}
