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

body {
    background: #0a0a1a;
    color: #eef5ff;
    font-family: 'Segoe UI', 'Fira Code', monospace;
    overflow-x: hidden;
}

/* Кастомный курсор */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #0ff;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: 0.05s linear;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: 0.1s linear;
}

/* Canvas для звёзд и комет */
#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

/* Шапка */
header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    margin-right: auto;
}

.logo span {
    color: #0ff;
}

/* Герой секция */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    min-height: auto;
}

.hero-text {
    flex: 1;
    text-align: center;
}

.hero-text h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #ffffff, #0ff, #7a2eff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

#typed-text {
    font-size: 1.2rem;
    color: #0ff;
    margin: 1rem 0;
    min-height: 60px;
    border-right: 2px solid #0ff;
    display: inline-block;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1rem;
}

.btn {
    display: block;
    background: transparent;
    border: 1.5px solid #0ff;
    color: #0ff;
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: 0.25s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: #0ff;
    color: #0a0f1e;
    box-shadow: 0 0 8px #0ff;
}

.btn-primary:active {
    background: transparent;
    color: #0ff;
    transform: scale(0.98);
}

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

/* Терминал */
.terminal {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 0.8rem;
    margin-top: 1.5rem;
    font-family: 'Courier New', monospace;
    border: 1px solid #0ff;
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff5f56;
}

.terminal-dot:nth-child(2) {
    background: #ffbd2e;
}

.terminal-dot:nth-child(3) {
    background: #27c93f;
}

.terminal-body {
    color: #0ff;
    font-size: 0.85rem;
    max-height: 300px;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.terminal-input {
    background: transparent;
    border: none;
    color: #0ff;
    font-family: monospace;
    outline: none;
    width: 85%;
    font-size: 0.85rem;
}

/* Анимация появления */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
    text-align: center;
}

/* Сетки навыков и проектов */
.skills-grid, .projects-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.skill-card, .project-card {
    background: rgba(15, 25, 45, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 1rem;
    width: calc(50% - 0.5rem);
    min-width: 140px;
    text-align: center;
    border: 1px solid rgba(0, 255, 255, 0.2);
    transition: all 0.3s;
    -webkit-tap-highlight-color: transparent;
}

.skill-card:active, .project-card:active {
    transform: translateY(-5px) scale(1.02);
    border-color: #0ff;
}

.skill-card {
    font-size: 1rem;
}

.skill-card small {
    font-size: 0.7rem;
    opacity: 0.8;
}

.project-card {
    width: 100%;
    text-align: left;
}

.project-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #0ff;
}

.project-card p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.project-tag {
    display: inline-block;
    background: rgba(0, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-right: 0.5rem;
    margin-top: 0.5rem;
}

.github-block {
    background: linear-gradient(145deg, #0b1120, #05080f);
    border-radius: 24px;
    padding: 1.5rem;
    text-align: center;
    margin: 2rem 0;
}

.repo-stats {
    font-size: 1.5rem;
    margin: 1rem 0;
}

footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #1e2a4a;
    font-size: 0.75rem;
}

/* Адаптивность */
@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }
    
    .hero {
        flex-direction: row;
        text-align: left;
    }
    
    .hero-text {
        text-align: left;
    }
    
    .btn-group {
        flex-direction: row;
    }
    
    .btn {
        display: inline-block;
    }
    
    .skill-card {
        width: 180px;
    }
    
    .project-card {
        width: calc(33.333% - 1rem);
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .hero-text h1 {
        font-size: 3.5rem;
    }
    
    #typed-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .cursor, .cursor-follower {
        display: none;
    }
    
    * {
        cursor: auto;
    }
    
    .terminal-body {
        font-size: 0.8rem;
        max-height: 250px;
    }
    
    .terminal-input {
        font-size: 0.8rem;
        width: 80%;
    }
    
    .skill-card:hover, .project-card:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    #typed-text {
        font-size: 1rem;
        min-height: 50px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .skill-card {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .github-block {
        padding: 1rem;
    }
    
    .repo-stats {
        font-size: 1.2rem;
    }
    
    .terminal-body {
        font-size: 0.7rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .skill-card:hover, .project-card:hover, .btn:hover {
        transform: none;
    }
    
    .skill-card:active, .project-card:active, .btn:active {
        transform: scale(0.98);
    }
}