/* ===== CSS Variables ===== */
:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --primary-light: #ff6b5b;
    --secondary: #2c3e50;
    --accent: #00d4aa;
    --background: #0a0a0f;
    --background-light: #12121a;
    --surface: #1a1a24;
    --surface-light: #252532;
    --text: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, #00a884 100%);
    --gradient-bg: linear-gradient(180deg, var(--background) 0%, var(--background-light) 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(231, 76, 60, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Particles Background ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0.6;
    }
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    font-size: 1.8rem;
}

.logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 24px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(231, 76, 60, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 24px;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.highlight {
    color: var(--primary-light);
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(231, 76, 60, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(231, 76, 60, 0.1);
}

/* ===== Hero Image ===== */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    position: relative;
    width: 350px;
    height: 350px;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 2;
}

.avatar-glow {
    position: absolute;
    inset: -20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    0% {
        opacity: 0.3;
        transform: scale(0.95);
    }
    100% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.avatar-ring {
    position: absolute;
    inset: -10px;
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-radius: 50%;
    animation: spin 20s linear infinite;
}

.avatar-ring::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.3;
        transform: translateY(8px);
    }
}

/* ===== Section Styles ===== */
section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ===== About Section ===== */
.about {
    background: var(--background-light);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: rgba(231, 76, 60, 0.3);
    box-shadow: var(--shadow-md);
}

.about-card.main-card {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(231, 76, 60, 0.1) 100%);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.about-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.about-card p {
    color: var(--text-secondary);
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.skill-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: rgba(231, 76, 60, 0.3);
    box-shadow: var(--shadow-md);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.skill-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.skill-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* ===== Stats Section ===== */
.stats {
    background: var(--gradient-primary);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    display: inline;
}

.stat-unit {
    font-size: 2rem;
    font-weight: 600;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 8px;
}

/* ===== Contact Section ===== */
.contact {
    background: var(--background-light);
}

.contact-content {
    text-align: center;
}

.contact-text {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 24px 32px;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-card.telegram:hover {
    border-color: #0088cc;
    box-shadow: 0 0 30px rgba(0, 136, 204, 0.2);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.contact-card.telegram .contact-icon {
    background: rgba(0, 136, 204, 0.1);
    color: #0088cc;
}

.contact-icon svg {
    width: 28px;
    height: 28px;
}

.contact-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.contact-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--background);
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-text {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-text a {
    color: var(--primary-light);
    transition: var(--transition);
}

.footer-text a:hover {
    text-decoration: underline;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .avatar-container {
        width: 280px;
        height: 280px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--surface);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        transition: var(--transition);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-card.main-card {
        grid-column: span 1;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .avatar-container {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}
