﻿/* ==========================================================================
   VARIABLES
   ========================================================================== */
:root {
    /* Цветовая палитра */
    --bg-dark: #0a0a12;
    --bg-dark-secondary: #1a1a2a;
    --text-primary: #ffffff;
    --text-secondary: #ccccdd;
    --accent-color: #7b68ee;
    --accent-hover: #9370db;
    --beginner-color: #6a5acd;
    --experienced-color: #7b68ee;
    --advanced-color: #9370db;
    /* Эффекты */
    --glass-bg: rgba(26, 26, 38, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-gradient: linear-gradient(45deg, var(--accent-color), #4a6fc1);
    /* Тени */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    /* Размеры */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: Verdana, sans-serif;
    line-height: 1.6;
    padding-top: 80px;
    position: relative;
}

    /* Фоновое изображение для всех страниц */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('/images/background-render.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.15;
        z-index: -1;
        pointer-events: none;
    }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

    a:hover {
        color: var(--accent-hover);
    }

img {
    max-width: 100%;
    height: auto;
}

/* Стили для футера */
footer .brand-accent {
    font-size: 1.8rem;
}

footer .brand-rest {
    font-size: 1.6rem;
}

.name-separator {
    margin: 0 10px;
    color: var(--text-secondary);
}

.footer-name {
    font-weight: 500;
    color: var(--text-secondary);
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-lg-6 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 992px) {
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
}

    .section-title:after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 60px;
        height: 3px;
        background-color: var(--accent-color);
    }

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 2rem !important;
    font-weight: 800;
    color: var(--text-primary) !important;
    position: relative;
    z-index: 2;
}

/* Единые стили для бренда */
.brand-accent {
    color: var(--accent-color);
    font-weight: 800;
    font-size: 2.2rem;
}

.brand-rest {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    margin: 0 0.3rem;
    padding: 0.8rem 1.2rem !important;
    transition: all 0.3s ease;
    position: relative;
    border-radius: var(--border-radius);
}

    .nav-link:hover,
    .nav-link.active {
        color: var(--text-primary) !important;
        background: rgba(123, 104, 238, 0.15);
    }

.nav-indicator {
    position: absolute;
    bottom: -2px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px;
    transition: all 0.3s ease;
    width: 0;
    left: 0;
    opacity: 0;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

    .btn-primary:hover {
        background-color: var(--accent-hover);
        border-color: var(--accent-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

.btn-outline-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background-color: transparent;
}

    .btn-outline-primary:hover {
        background-color: var(--accent-color);
        color: var(--bg-dark);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.8));
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-jpg {
    display: none;
}

/* Skills grid on homepage */
.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    border-radius: var(--border-radius-lg);
    border-left: 3px solid var(--accent-color);
    transition: all 0.3s ease;
}

    .skill-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateX(5px);
    }

.skill-icon {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 0.5rem;
}

    .skill-icon img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.skill-info h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.skill-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ==========================================================================
   ABOUT PAGE STYLES
   ========================================================================== */
.about-hero {
    margin-bottom: 6rem;
}

.about-title {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.text-accent {
    color: var(--accent-color);
}

.about-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

    .about-description .lead {
        font-size: 1.4rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 2rem;
    }

.about-image-wrapper {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.about-image {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: var(--shadow-xl);
    margin: 0 auto;
    display: block;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--accent-gradient);
    color: white;
    padding: 1.5rem;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

    .experience-badge .years {
        font-size: 2.5rem;
        line-height: 1;
        margin-bottom: 0.2rem;
    }

    .experience-badge .text {
        font-size: 0.8rem;
        line-height: 1.1;
        text-transform: uppercase;
    }

/* Software proficiency section */
.skills-section {
    margin-top: 4rem;
}

.skills-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.software-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

    .software-item:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }

.software-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

    .software-header img {
        width: 50px;
        height: 50px;
        object-fit: contain;
        margin-bottom: 0.8rem;
    }

    .software-header span {
        font-weight: 600;
        text-align: center;
    }

.software-level {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    text-align: center;
    width: 100%;
}

    .software-level.beginner {
        background-color: var(--beginner-color);
    }

    .software-level.experienced {
        background-color: var(--experienced-color);
    }

    .software-level.advanced {
        background-color: var(--advanced-color);
    }

/* Стили для информации о местоположении и почте */
.personal-info {
    margin-top: 4rem;
    text-align: center;
}

.location-info, .email-info {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

    .location-info i, .email-info i {
        margin-right: 0.8rem;
        color: var(--accent-color);
        font-size: 1.2rem;
    }

    .email-info a {
        color: var(--text-secondary);
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .email-info a:hover {
            color: var(--accent-color);
        }

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .personal-info {
        margin-top: 3rem;
    }

    .location-info, .email-info {
        flex-direction: column;
        text-align: center;
    }

        .location-info i, .email-info i {
            margin-right: 0;
            margin-bottom: 0.5rem;
        }
}

/* ==========================================================================
   PORTFOLIO STYLES
   ========================================================================== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    border-radius: var(--border-radius);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-category {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Featured category */
.featured-category {
    position: relative;
    height: 400px;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    margin-bottom: 4rem;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-xl);
}

    .featured-category:hover {
        transform: translateY(-10px);
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    }

.featured-category-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-category:hover .featured-category-img {
    transform: scale(1.1);
}

.featured-category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(66, 66, 90, 0.7), rgba(88, 88, 120, 0.7));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.featured-category-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.featured-category-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Portfolio categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.category-tile {
    background: linear-gradient(145deg, var(--bg-dark-secondary), #1e2a4a);
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

    .category-tile:before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
        transition: left 0.6s ease;
    }

    .category-tile:hover:before {
        left: 100%;
    }

    .category-tile:hover {
        transform: translateY(-8px);
        border-color: var(--accent-color);
        box-shadow: var(--shadow-xl);
    }

.category-tile-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.category-tile-content p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Image gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}

.gallery-item {
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

    /* Каждый третий элемент занимает две колонки */
    .gallery-item:nth-child(3n) {
        grid-column: span 2;
        aspect-ratio: 16/9;
    }

    .gallery-item:hover {
        transform: translateY(-5px);
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    /* Эффект затемнения при наведении на изображение */
    .gallery-item::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.1);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .gallery-item:hover::after {
        opacity: 1;
    }

.image-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    pointer-events: none;
    transition: border-color 0.3s ease;
}

.gallery-item:hover .image-border {
    border-color: rgba(102, 126, 234, 0.3);
}

/* Category sections */
.category-section {
    margin: 8rem 0;
    scroll-margin-top: 100px;
}

.category-header {
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1.5rem;
}

    .category-header h3 {
        font-size: 3rem;
        margin-bottom: 1.5rem;
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .category-header:after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100px;
        height: 5px;
        background: var(--accent-gradient);
        border-radius: 3px;
    }

.category-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 800px;
}

.category-section.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   CONTACT STYLES
   ========================================================================== */
.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Form styles */
.form-control {
    background-color: var(--bg-dark-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 0.8rem;
    transition: all 0.3s ease;
}

    .form-control:focus {
        background-color: var(--bg-dark-secondary);
        border-color: var(--accent-color);
        color: var(--text-primary);
        box-shadow: 0 0 0 0.2rem rgba(123, 104, 238, 0.25);
    }

.form-label {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: var(--bg-dark-secondary);
    padding: 3rem 0;
}

.social-links a {
    display: inline-block;
    margin-left: 1rem;
    transition: all 0.3s ease;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover .social-icon {
    transform: translateY(-3px);
    filter: none;
    box-shadow: 0 5px 15px rgba(123, 104, 238, 0.4);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-center {
    text-align: center;
}

.text-lg-end {
    text-align: right;
}

@media (max-width: 992px) {
    .text-lg-end {
        text-align: center;
    }
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.me-3 {
    margin-right: 1rem;
}

.d-flex {
    display: flex;
}

.gap-3 {
    gap: 1rem;
}

.align-items-center {
    align-items: center;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: 100px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-title {
        font-size: 3rem;
    }

    .section {
        padding: 3rem 0;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-tile {
        padding: 2rem;
    }

    .category-tile-content h3 {
        font-size: 1.5rem;
    }

    .image-gallery {
        gap: 1rem;
    }

    .gallery-item.small,
    .gallery-item.medium,
    .gallery-item.large,
    .gallery-item.xlarge {
        grid-row: span 1;
        grid-column: span 1;
        aspect-ratio: 1/1;
    }

    .featured-category {
        height: 300px;
    }

    .featured-category-title {
        font-size: 2rem;
    }

    .software-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .btn {
        margin-bottom: 1rem;
    }
}

/* Animation for category sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section.visible {
    animation: fadeInUp 0.6s ease forwards;
}

/* Language switcher */
.language-switcher {
    margin-left: 1.5rem;
}

.btn-language {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-language:hover {
        background: var(--accent-gradient);
        border-color: transparent;
        transform: translateY(-2px);
    }

/* Load more button */
.load-more-container {
    text-align: center;
    margin: 3rem 0;
}

.load-more-btn {
    background: var(--accent-gradient);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .load-more-btn:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
    }

    .load-more-btn:active {
        transform: translateY(-1px);
    }

/* ==========================================================================
   MODAL WINDOW
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1040;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
}

.modal-content {
    display: block;
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.modal-close {
    position: fixed;
    top: 25px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

    .modal-close:hover {
        background: var(--accent-color);
        transform: rotate(90deg);
    }
.modal.show {
    display: flex;
}

    .modal.show .modal-content {
        animation: zoomIn 0.3s ease;
    }

/* Анимация появления (если нужно) */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}