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

:root {
    --primary-bg: #0c0c0c;
    --secondary-bg: #1a1a1a;
    --accent-color: #f0b90b;
    --text-primary: #ffffff;
    --text-secondary: #c9c6c6;
    --card-bg: #1e1e1e;
    --border-color: #2d2d2d;
    --success-color: #00c087;
    --error-color: #f6465d;
    --post-text-color: #e4e4e4; 
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--primary-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-right: auto;
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(240, 185, 11, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(240, 185, 11, 0.05) 0%, transparent 50%);
}

.hero-content {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-color) 0%, #f8d33a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent-color);
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent-color);
    color: #000;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid var(--accent-color);
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(240, 185, 11, 0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.profile-photo {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow:
        0 0 50px rgba(240, 185, 11, 0.2),
        0 0 100px rgba(240, 185, 11, 0.1);
    transition: transform 0.3s;
}

.profile-photo:hover {
    transform: scale(1.05);
}

/* Sections */
section {
    padding: 100px 0;
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.about {
    background: var(--secondary-bg);
}

.about p {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.skills {
    background: var(--primary-bg);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    cursor: pointer;
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(240, 185, 11, 0.1);
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

/* Стили для навигации */
.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: auto;
}

.nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav a:hover {
    color: var(--accent-color);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s;
}

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

#auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#user-profile {
    display: none;
    gap: 1rem;
    align-items: center;
}

.nav .btn-outline {
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
}

#username {
    color: var(--accent-color);
    font-weight: 600;
    margin-right: 10px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Стили для фич-листа с иконками слева */
.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-primary);
}

.feature-icon.simple {
    background: transparent;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon.simple img {
    filter: none;
    width: 40px;
    height: 40px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

.feature-content {
    flex: 1;
}

.feature-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.feature-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Стили для навигационных кнопок */
.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.username {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1;
    display: flex;
    align-items: center;
    position: relative;
    top: 2px;
}

/* Адаптивность для мобильных */
/* Адаптивность для мобильных */
/* Стили для блока с ником и бургер-меню */
.header-user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.header-username {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    display: none;
}

/* Стили для бургер-меню - ДЕСКТОП (скрыт) */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background-color: var(--accent-color);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: var(--accent-color);
}

/* МОБИЛЬНАЯ ВЕРСИЯ С БОКОВЫМ МЕНЮ СПРАВА */
@media (max-width: 768px) {

    /* Показываем кнопку бургера и ник */
    .burger-menu {
        display: flex !important;
    }

    .header-username {
        display: block;
        color: var(--accent-color);
        font-weight: 600;
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100px;
    }

    .header-user-section {
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }

    .header {
        padding: 0.5rem 0;
        min-height: 60px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background: var(--secondary-bg);
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
    }

    body {
        padding-top: 60px !important;
        /* Уменьшил отступ */
    }

    body.menu-open {
        overflow: hidden;
        /* Убрал transform для body - контент не сдвигается */
    }

    .header .container {
        padding: 0 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        position: relative;
        z-index: 1001;
    }

    .logo {
        font-size: 1.3rem;
        margin-right: auto;
        z-index: 1002;
    }

    .logo a {
        font-size: 1.3rem !important;
        position: relative;
        z-index: 1003;
    }

    /* Боковое меню СПРАВА - компактное */
    .nav {
        position: fixed;
        top: 0;
        right: -220px;
        /* Уменьшил ширину */
        width: 220px;
        /* Компактное меню */
        height: 100vh;
        background: var(--secondary-bg);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 70px 15px 20px 15px;
        /* Уменьшил паддинги */
        gap: 0.8rem;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.3);
        border-left: 1px solid var(--border-color);
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    .nav a {
        font-size: 0.9rem;
        /* Уменьшил шрифт */
        padding: 10px 12px;
        /* Уменьшил паддинги */
        width: 100%;
        text-align: left;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background: var(--card-bg);
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .nav a:hover {
        background: var(--accent-color);
        color: #000;
        border-color: var(--accent-color);
        transform: translateX(-3px);
    }

    #auth-buttons,
    #user-profile {
        flex-direction: column;
        gap: 0.8rem;
        margin-left: 0;
        width: 100%;
    }

    .nav .btn-outline {
        padding: 10px 12px;
        font-size: 0.9rem;
        height: auto;
        width: 100%;
        text-align: left;
    }

    .username {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        text-align: left;
        display: block;
        width: 100%;
        color: var(--accent-color);
        padding: 0 12px;
        font-weight: 600;
    }

    /* Затемнение фона */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 998;
        backdrop-filter: blur(2px);
    }

    .nav-overlay.active {
        display: block;
    }

    /* Hero section - убираем лишние отступы */
    .hero {
        padding: 40px 0 60px;
        /* Уменьшил верхний паддинг */
        margin-top: 0;
        /* Убрал маргин */
        background: linear-gradient(135deg, var(--secondary-bg) 0%, var(--primary-bg) 100%);
        position: relative;
        overflow: hidden;
    }

    .hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background:
            radial-gradient(circle at 20% 50%, rgba(240, 185, 11, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(240, 185, 11, 0.05) 0%, transparent 50%);
    }

    .hero-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        align-items: center;
        position: relative;
        z-index: 2;
        text-align: center;
    }

    .hero-text h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .hero-text p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .profile-photo {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 1.5rem;
    }

    .cta-buttons .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 0.95rem;
        text-align: center;
        border-radius: 8px;
    }

    .cta-buttons .btn:first-child {
        order: -1;
    }

    /* Добавим немного анимации */
    .cta-buttons .btn {
        transition: all 0.3s ease;
    }

    .cta-buttons .btn:active {
        transform: scale(0.98);
    }

    section {
        padding: 50px 0;
        /* Уменьшил отступы секций */
    }

    section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .header-username {
        font-size: 0.8rem;
        max-width: 80px;
    }

    .header-user-section {
        gap: 0.6rem;
    }

    .nav {
        width: 200px;
        /* Еще уже на маленьких экранах */
        right: -200px;
        padding: 65px 12px 20px 12px;
    }

    .header .container {
        padding: 0 10px;
    }

    .logo a {
        font-size: 1.1rem !important;
    }

    .burger-menu {
        width: 25px;
        height: 18px;
    }

    .nav a {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .hero {
        padding: 30px 0 40px;
    }

    .hero-text h2 {
        font-size: 1.6rem;
    }

    .hero-text p {
        font-size: 0.9rem;
    }

    .profile-photo {
        width: 150px;
        height: 150px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    section {
        padding: 40px 0;
    }

    section h2 {
        font-size: 1.6rem;
    }
}

/* Десктопная версия */
@media (min-width: 769px) {
    .header-username.authenticated {
        display: none;
        color: var(--accent-color);
        font-weight: 600;
        font-size: 0.9rem;
        margin-right: 1rem;
    }

    .hero-content {
        display: grid;
        grid-template-columns: 65% 35%;
        gap: 4rem;
        align-items: center;
        text-align: left;
    }

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

    .cta-buttons {
        gap: 0.6rem;
    }

    .cta-buttons .btn {
        padding: 12px 18px;
        font-size: 0.9rem;
    }

    .cta-buttons .btn:first-child {
        order: -1;
    }

    .profile-photo {
        margin: 0;
    }
}