/* ==========================================
   БАЗОВЫЕ СТИЛИ И ПЕРЕМЕННЫЕ
   ========================================== */

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #141829;
    --bg-card: rgba(20, 24, 41, 0.6);
    --bg-terminal: rgba(15, 19, 35, 0.8);
    
    --text-primary: #e6e6e6;
    --text-secondary: #8892b0;
    --text-muted: #4d5566;
    
    --accent-primary: #64c8ff;
    --accent-secondary: #a855f7;
    --accent-success: #10b981;
    
    --border-subtle: rgba(100, 200, 255, 0.15);
    --border-active: rgba(100, 200, 255, 0.5);
    
    --shadow-glow: 0 0 20px rgba(100, 200, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   ФОН И ЭФФЕКТЫ
   ========================================== */

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

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(100, 200, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(1px);
    animation: float linear infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% { 
        transform: translate(30px, -40px) scale(1.1);
        opacity: 0.5;
    }
    50% { 
        transform: translate(-20px, -80px) scale(0.9);
        opacity: 0.7;
    }
    75% { 
        transform: translate(20px, -40px) scale(1.05);
        opacity: 0.4;
    }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(100, 200, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100, 200, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    pointer-events: none;
}

/* ==========================================
   КОНТЕЙНЕР
   ========================================== */

.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 60px;
    min-height: 100vh;
}

/* ==========================================
   ТЕРМИНАЛ
   ========================================== */

.terminal-header {
    background: var(--bg-terminal);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 48px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(15, 19, 35, 0.9);
    border-bottom: 1px solid var(--border-subtle);
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close {
    background: #ff5f56;
}

.btn-minimize {
    background: #ffbd2e;
}

.btn-maximize {
    background: #27c93f;
}

.terminal-title {
    font-size: 13px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: var(--text-secondary);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.terminal-content {
    padding: 20px 24px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
}

.terminal-line {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.prompt {
    color: var(--accent-primary);
    margin-right: 12px;
    font-weight: 600;
}

.command {
    color: var(--accent-secondary);
}

.terminal-output {
    padding-left: 28px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.json-key {
    color: var(--accent-primary);
}

.json-value {
    color: var(--accent-success);
}

.typing-text {
    color: var(--text-primary);
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 18px;
    background: var(--accent-primary);
    margin-left: 4px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ==========================================
   ГЕРОЙ / ЗАГОЛОВОК
   ========================================== */

.hero {
    text-align: center;
    margin-bottom: 64px;
    animation: slideUp 0.8s ease-out 0.2s backwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.name {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: clamp(18px, 3vw, 24px);
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 400;
}

.bracket {
    color: var(--accent-primary);
    font-weight: 600;
    font-family: 'SF Mono', monospace;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 24px;
    font-size: 14px;
    color: var(--accent-success);
    font-weight: 500;
}

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

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

/* ==========================================
   КАРТОЧКИ КОНТАКТОВ
   ========================================== */

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 64px;
}

.contact-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 28px 24px;
    backdrop-filter: blur(12px);
    transition: all var(--transition-medium);
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: fadeInUp 0.6s ease-out backwards;
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }
.contact-card:nth-child(4) { animation-delay: 0.4s; }
.contact-card:nth-child(5) { animation-delay: 0.5s; }
.contact-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(100, 200, 255, 0.15) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity var(--transition-medium);
    pointer-events: none;
}

.contact-card:hover {
    border-color: var(--border-active);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(100, 200, 255, 0.15);
}

.contact-card:hover .card-glow {
    opacity: 1;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 200, 255, 0.1);
    border-radius: 12px;
    color: var(--accent-primary);
    transition: all var(--transition-medium);
    flex-shrink: 0;
}

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

.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(100, 200, 255, 0.2);
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-value {
    font-size: 15px;
    color: var(--accent-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-arrow {
    font-size: 20px;
    color: var(--text-muted);
    transition: all var(--transition-medium);
    flex-shrink: 0;
}

.contact-card:hover .card-arrow {
    color: var(--accent-primary);
    transform: translateX(4px);
}

/* ==========================================
   ФУТЕР
   ========================================== */

.footer {
    margin-top: 80px;
    animation: fadeIn 1s ease-out 0.8s backwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.code-block {
    background: var(--bg-terminal);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
    backdrop-filter: blur(12px);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(10, 14, 27, 0.6);
    border-bottom: 1px solid var(--border-subtle);
}

.code-lang {
    font-size: 12px;
    font-family: 'SF Mono', monospace;
    color: var(--accent-primary);
    text-transform: uppercase;
    font-weight: 600;
}

.code-file {
    font-size: 12px;
    font-family: 'SF Mono', monospace;
    color: var(--text-muted);
}

.code-content {
    padding: 20px 24px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.code-keyword {
    color: #ff79c6;
}

.code-variable {
    color: #50fa7b;
}

.code-property {
    color: var(--accent-primary);
}

.code-string {
    color: #f1fa8c;
}

.code-number {
    color: #bd93f9;
}

.footer-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-text p {
    margin-bottom: 8px;
}

.copyright {
    color: var(--text-muted);
    font-size: 13px;
}

/* ==========================================
   АДАПТИВНОСТЬ
   ========================================== */

@media (max-width: 768px) {
    .container {
        padding: 24px 16px 40px;
    }
    
    .terminal-title {
        font-size: 11px;
    }
    
    .terminal-content {
        padding: 16px;
        font-size: 12px;
    }
    
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .contact-card {
        padding: 20px 16px;
    }
    
    .code-content {
        font-size: 12px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .terminal-bar {
        padding: 10px 12px;
    }
    
    .terminal-buttons span {
        width: 10px;
        height: 10px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon svg {
        width: 20px;
        height: 20px;
    }
}

