/* Базовая адаптивность */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .team-name {
        font-size: 3.5rem;
    }
    
    .developer-cards {
        gap: 2rem;
    }
    
    .workflow {
        gap: 1.5rem;
    }
}

/* Планшеты */
@media (max-width: 1024px) {
    .container {
        padding: 0 25px;
    }
    
    .team-name {
        font-size: 3rem;
    }
    
    .team-tagline {
        font-size: 1.2rem;
    }
    
    .developer-cards {
        gap: 1.5rem;
    }
    
    .dev-card {
        width: 250px;
        padding: 1.5rem;
    }
    
    .workflow {
        gap: 1rem;
    }
    
    .process-step {
        padding: 1.5rem;
        min-width: 180px;
    }
    
    .stack-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .philosophy-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Мобильные устройства */
@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .team-name {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .team-tagline {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .developer-cards {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .dev-card {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .synergy {
        order: -1;
        margin-bottom: 1rem;
        flex-direction: row;
        gap: 1rem;
    }
    
    .synergy span {
        font-size: 1rem;
    }
    
    .workflow {
        flex-direction: column;
        gap: 2rem;
    }
    
    .process-step {
        width: 100%;
        min-width: unset;
    }
    
    .process-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        min-width: unset;
    }
    
    .project-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .comparison {
        flex-direction: column;
        gap: 2rem;
    }
    
    .comparison-card {
        min-width: unset;
        width: 100%;
    }
    
    .vs-circle {
        order: -1;
        margin: 0 auto;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Философия секция */
    .typing-demo {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .philosophy-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .philosophy-visual {
        order: -1;
    }
    
    .code-animation {
        font-size: 0.8rem;
    }
    
    /* Preloader */
    .n-code-logo {
        font-size: 2.5rem;
    }
    
    .loading-container {
        width: 250px;
    }
}

/* Маленькие мобильные устройства */
@media (max-width: 480px) {
    section {
        padding: 50px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .team-name {
        font-size: 2rem;
    }
    
    .team-tagline {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .dev-card {
        padding: 1.5rem;
        width: 100%;
    }
    
    .process-step {
        padding: 1.5rem;
    }
    
    .stack-category {
        padding: 1.5rem;
    }
    
    .project-info {
        padding: 1.5rem;
    }
    
    .project-preview {
        height: 150px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .project-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .project-link {
        justify-content: center;
    }
    
    .n-code-logo {
        font-size: 2rem;
    }
    
    .preloader-content {
        padding: 0 20px;
    }
    
    .hero {
        min-height: 100vh;
        padding: 80px 0;
    }
    
    /* Философия секция для маленьких экранов */
    .typing-demo {
        padding: 1rem;
    }
    
    .typing-demo h3 {
        font-size: 1.5rem;
    }
    
    .philosophy-visual {
        padding: 1rem;
    }
    
    .code-animation {
        font-size: 0.75rem;
        margin-top: 1.5rem;
    }
    
    .code-line {
        padding-left: 0.25rem;
        margin-bottom: 0.2rem;
    }
    
    .typing-demo.in-view .code-line:nth-child(3),
    .typing-demo.in-view .code-line:nth-child(7) {
        padding-left: 0.5rem;
    }
}

/* Ландшафтная ориентация для мобильных */
@media (max-height: 700px) and (orientation: landscape) {
    .hero {
        min-height: 700px;
        padding: 80px 0;
    }
    
    .team-name {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .team-tagline {
        margin-bottom: 1.5rem;
        font-size: 1rem;
    }
    
    .developer-cards {
        margin-bottom: 1.5rem;
        flex-direction: row;
        gap: 1rem;
    }
    
    .dev-card {
        width: 200px;
        padding: 1rem;
    }
    
    .dev-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .synergy {
        margin-bottom: 0.5rem;
    }
}

/* Большие экраны */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .team-name {
        font-size: 5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Стили для печати */
@media print {
    .preloader,
    .scroll-indicator,
    .cta-button,
    .project-links,
    .social-links,
    .contact-form,
    .synergy,
    .process-arrow {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    
    .dev-card,
    .process-step,
    .stack-category,
    .project-card,
    .comparison-card,
    .stat-item {
        background: white !important;
        border: 1px solid #ddd !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .section-title {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
    
    section {
        padding: 50px 0 !important;
        page-break-inside: avoid;
    }
}

/* Доступность: уменьшенное движение */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Высокая контрастность */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #111111;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --card-bg: #222222;
    }
    
    .accent-frontend {
        color: #00ffff !important;
    }
    
    .accent-backend {
        color: #ff5500 !important;
    }
}

/* Устройства без hover (тач-скрины) */
@media (hover: none) and (pointer: coarse) {
    .dev-card:hover,
    .project-card:hover,
    .stat-item:hover,
    .tech-item:hover,
    .contact-method:hover,
    .process-step:hover {
        transform: none;
    }
    
    .filter-btn:hover {
        background: var(--bg-secondary);
        color: var(--text-secondary);
    }
    
    .filter-btn.active {
        background: linear-gradient(135deg, var(--accent-frontend), var(--accent-backend));
        color: white;
    }
    
    .project-link:hover,
    .social-link:hover,
    .footer-links a:hover {
        transform: none;
    }
}

/* Фикс для очень маленьких экранов */
@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }
    
    .team-name {
        font-size: 1.8rem;
    }
    
    .dev-card {
        padding: 1rem;
    }
    
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
}
/* Фикс для стрелочки на мобильных */
@media (max-width: 768px) {
    .hero {
        position: relative;
        min-height: 100vh;
        padding-bottom: 80px !important;
    }
    
    .team-presentation {
        position: relative;
        z-index: 20;
    }
    
    .cta-button {
        position: relative;
        z-index: 25;
        margin: 1rem auto 2rem;
        display: inline-flex;
    }
    
    .scroll-indicator {
        position: absolute;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 15;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-bottom: 70px !important;
    }
    
    .cta-button {
        margin: 0.5rem auto 1.5rem;
        padding: 0.8rem 1.5rem;
    }
    
    .scroll-indicator {
        bottom: 25px;
    }
}