/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0f172a;
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e1b4b;
    --cyan: #06b6d4;
    --purple: #8b5cf6;
    --pink: #ec4899;
    --white: #ffffff;
    --text-gray: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    color: var(--white);
    overflow-x: hidden;
    position: relative;
}

/* ===== BACKGROUND PARTICLES ===== */
.bg-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; color: var(--cyan); }
.particle:nth-child(2) { top: 20%; right: 10%; animation-delay: 1s; color: var(--purple); }
.particle:nth-child(3) { top: 40%; left: 8%; animation-delay: 2s; color: var(--cyan); }
.particle:nth-child(4) { top: 60%; right: 15%; animation-delay: 3s; color: var(--purple); }
.particle:nth-child(5) { top: 80%; left: 12%; animation-delay: 4s; color: var(--pink); }
.particle:nth-child(6) { top: 90%; right: 8%; animation-delay: 5s; color: var(--cyan); }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-20px) rotate(10deg); opacity: 0.6; }
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(6, 182, 212, 0.2);
}

/* ===== HEADER ===== */
.header {
    position: sticky;
    top: 2rem;
    z-index: 100;
}

.header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.domain {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ===== HERO SECTION ===== */
.hero-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo-container {
    flex-shrink: 0;
}

.profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    object-fit: cover;
    object-position: center;
    /* Градиентная рамка через border */
    border: 3px solid transparent;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6, #ec4899) border-box;
    -webkit-background-clip: content-box, border-box;
    background-clip: content-box, border-box;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.7);
}

.logo-container {
    flex-shrink: 0;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--white), var(--text-gray));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
}

/* Добавьте в style.css */
.hero-text h1 {
    animation: blink-slow 3s ease-in-out infinite;
}

@keyframes blink-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.subtitle {
    font-family: 'Fira Code', monospace;
    color: var(--purple);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.description {
    font-family: 'Fira Code', monospace;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===== TAGS ===== */
.tag {
    font-family: 'Fira Code', monospace;
    color: var(--cyan);
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ===== SKILLS ===== */
.skills h2, .projects h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment {
    font-family: 'Fira Code', monospace;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.percentage {
    font-family: 'Fira Code', monospace;
    color: var(--cyan);
    font-size: 0.9rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease;
}

.progress.html { background: linear-gradient(90deg, #e34c26, #f06529); }
.progress.css { background: linear-gradient(90deg, #264de4, #2965f1); }
.progress.js { background: linear-gradient(90deg, #f7df1e, #ffd700); }
.progress.react { background: linear-gradient(90deg, #61dafb, #00d8ff); }
.progress.vue { background: linear-gradient(90deg, #42b883, #35495e); }

/* ===== PROJECTS ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.project-tag {
    font-family: 'Fira Code', monospace;
    color: var(--purple);
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.project-image {
    width: 100%;
    height: 150px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border-radius: 8px;
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: opacity 0.3s ease;
}

.btn:hover {
    opacity: 0.8;
}

/* ===== TERMINAL FOOTER ===== */
.terminal {
    font-family: 'Fira Code', monospace;
}

.terminal-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca40; }

.terminal-content {
    line-height: 1.8;
}

.prompt {
    color: var(--cyan);
}

.output {
    color: var(--text-gray);
    margin: 1rem 0;
    padding-left: 1rem;
}

.property {
    color: var(--purple);
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.footer-tag {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    font-family: 'Fira Code', monospace;
    color: var(--cyan);
    font-size: 0.85rem;
}

/* ===== TYPING EFFECT ===== */
.typing-effect {
    border-right: 3px solid var(--cyan);
    animation: typing 3s steps(30), blink 0.75s step-end infinite;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
    max-width: 100%;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .logo {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .nav-links {
        justify-content: center;
        gap: 1rem;
    }

    .header nav {
        flex-direction: column;
        text-align: center;
    }

    .particle {
        font-size: 1.5rem;
    }

    .typing-effect {
        white-space: normal;
        border-right: none;
        animation: none;
    }
}

@media (max-width: 480px) {
    .glass-card {
        padding: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SCROLL BEHAVIOR ===== */
html {
    scroll-behavior: smooth;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--cyan), var(--purple));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--purple), var(--pink));
}