/* ===== БАЗОВЫЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #666;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 28px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    animation: fadeIn 0.8s ease-out;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

/* ===== НАВИГАЦИЯ ===== */
header {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(44, 62, 80, 0.98);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

nav h1 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    margin: 0;
    white-space: nowrap;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    white-space: nowrap;
}

nav a:hover {
    color: var(--primary-color);
    background: rgba(255,255,255,0.1);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 80%;
}

nav a.active {
    color: var(--primary-color);
    background: rgba(255,255,255,0.1);
}

nav a.active::after {
    width: 80%;
}

/* ===== СЕКЦИИ ===== */
section {
    padding: 6rem 2rem;
    position: relative;
    border-bottom: 1px solid #eaeaea;
    overflow: hidden;
}

section:last-child {
    border-bottom: none;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem;
    color: var(--secondary-color);
    position: relative;
    font-weight: 700;
    width: 100%;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 4px;
    background: var(--primary-color);
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ===== ГЕРОЙ СЕКЦИЯ ===== */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 120px;
    padding-bottom: 80px;
    border-bottom: none;
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50px, -50px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.4;
    color: white;
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero-highlights {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.highlight-item {
    text-align: center;
    max-width: 200px;
}

.highlight-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.1);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    transition: var(--transition);
}

.highlight-item:hover .highlight-icon {
    transform: scale(1.1);
    background: rgba(255,255,255,0.2);
}

.highlight-item p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem; 
    margin-bottom: 1rem; 
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: var(--transition);
    border: 2px solid var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.btn-primary:hover {
    background: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: var(--transition);
    border: 2px solid white;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.btn-secondary:hover {
    background: white;
    color: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===== КАРТОЧКИ ПРОЕКТОВ ===== */
.projects {
    background: var(--light-color);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: none;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-align: center;
}

.project-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
}

.project-meta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-date {
    background: #f0f0f0;
    color: #666;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.project-status {
    background: #27ae60;
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.project-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1;
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-links-container {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    flex-wrap: wrap;
    width: 100%;
}

.project-link-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    flex: 1;
    min-width: 0;
    text-align: center;
    cursor: pointer;
}

.project-link-details:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.project-link-github {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #333;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    flex: 1;
    min-width: 0;
    text-align: center;
    cursor: pointer;
}

.project-link-github:hover {
    background: #222;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ===== ИКОНКИ ТЕХНОЛОГИЙ ===== */
.tech-icons-section {
    background: white;
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.tech-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem;
    transition: var(--transition);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    opacity: 0;
    transform: translateY(20px);
}

.tech-icon-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.tech-icon-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.tech-icon-item span {
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ===== СЕКЦИЯ "ОБО МНЕ" ===== */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    background: white;
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    border-left: 4px solid var(--primary-color);
    overflow: hidden;
}

.about-text h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.about-text p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-break: break-word;
}

.about-text strong {
    color: var(--primary-color);
    word-break: break-word;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 3px solid var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
    overflow: hidden;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
    overflow-wrap: break-word;
    word-break: break-word;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.05rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.skill-category li:last-child {
    border-bottom: none;
}

.skill-category li i {
    color: var(--primary-color);
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== КОНТАКТЫ ===== */
.contact {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: white;
    text-align: center;
    border-bottom: none;
}

.contact .section-title {
    color: white;
}

.contact .section-title::after {
    background: white;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    min-width: 250px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(20px);
    overflow: hidden;
    width: 100%;
    max-width: 300px;
}

.contact-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.contact-card i {
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
}

.contact-card h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    overflow-wrap: break-word;
    word-break: break-word;
}

.contact-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.contact-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact-link.email-link {
    font-size: 0.95rem;
    padding: 0.3rem;
    display: inline-block;
    width: 100%;
    word-break: break-all;
}

.contact-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.collaboration-cta {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.collaboration-cta h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.collaboration-cta p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ===== ФУТЕР ===== */
footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    overflow-wrap: break-word;
    word-break: break-word;
}

footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

footer p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.project-card:nth-child(1) { animation-delay: 0s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.2s; }

/* ===== ОПТИМИЗАЦИЯ ИЗОБРАЖЕНИЙ ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* ===== УТИЛИТНЫЕ КЛАССЫ ===== */
.text-wrap {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.nowrap {
    white-space: nowrap;
}

/* ===== МОБИЛЬНЫЕ УСТРОЙСТВА ===== */

/* Планшеты */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
    
    .hero-highlights {
        gap: 2rem;
    }
    
    .highlight-item {
        max-width: 180px;
    }
    
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-links {
        gap: 1.5rem;
    }
    
    .contact-card {
        min-width: 220px;
    }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9999;
    }
    
    nav {
        flex-direction: column;
        padding: 0.5rem 0.8rem;
        gap: 0.3rem;
    }

    nav h1 {
        font-size: 1.2rem;
        margin: 0;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
        margin: 0;
        padding: 0;
    }

    nav a {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }

    .hero {
        padding-top: 140px !important;
        padding-bottom: 60px;
        min-height: 100vh;
        display: flex;
        align-items: flex-start;
        margin-top: 0;
    }

    .hero-content {
        padding: 0 0.8rem;
        width: 100%;
        margin-top: 0;
    }

    .hero h2 {
        font-size: 1.8rem;
        line-height: 1.2;
        padding: 0;
        margin-top: 0;
        margin-bottom: 0.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
        padding: 0;
        margin-top: 0.3rem;
        margin-bottom: 1.2rem;
    }
    
    .hero-highlights {
        gap: 1rem;
        margin: 1.2rem 0;
    }
    
    .highlight-item {
        max-width: 140px;
    }
    
    .highlight-icon {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
    
    .highlight-item p {
        font-size: 0.85rem;
    }
    
    .cta-buttons {
        margin-top: 1rem !important;
        margin-bottom: 0.5rem !important;
        gap: 0.8rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 260px;
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
        padding: 0 0.5rem;
        margin-bottom: 2.5rem;
    }

    section {
        padding: 2.5rem 0.8rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
    }

    .project-card {
        padding: 1.2rem;
        margin-bottom: 0;
    }

    .project-card h3 {
        font-size: 1.3rem;
    }
    
    .project-card p {
        font-size: 0.9rem;
    }

    .project-links-container {
        flex-direction: column;
    }

    .project-link-details,
    .project-link-github {
        width: 100%;
        padding: 0.6rem 0.8rem;
    }

    .tech-icons {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        padding: 1.2rem;
    }
    
    .tech-icon-item {
        padding: 0.8rem;
    }
    
    .tech-icon-item i {
        font-size: 1.8rem;
    }
    
    .tech-icon-item span {
        font-size: 0.8rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
    }

    .contact-card {
        width: 100%;
        max-width: 260px;
        padding: 1.2rem;
        margin: 0 auto;
    }
    
    .contact-link {
        font-size: 0.95rem;
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }
    
    .contact-link.email-link {
        font-size: 0.85rem;
        word-break: break-all;
        line-height: 1.3;
    }

    .skill-category,
    .about-text {
        padding: 1.2rem;
    }
    
    .about-text h3 {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .about-text p {
        font-size: 0.95rem;
        line-height: 1.5;
        text-align: justify;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
    }
    
    .skill-category h4 {
        font-size: 1.1rem;
    }
    
    .skill-category li {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    footer {
        padding: 1.5rem 0.8rem;
    }
    
    footer p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .collaboration-cta {
        padding: 1.2rem;
        margin: 1.5rem 0.5rem;
    }
    
    .collaboration-cta h3 {
        font-size: 1.2rem;
    }
    
    .collaboration-cta p {
        font-size: 0.9rem;
    }

    .certificates-container {
        margin-top: 140px !important;
    }

    .project-detail-container {
        margin-top: 140px !important;
    }
}

/* Очень маленькие мобильные устройства (до 480px) */
@media (max-width: 480px) {
    nav h1 {
        font-size: 1.1rem;
    }
    
    nav ul {
        gap: 0.2rem;
    }
    
    nav a {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }    
    
    .hero {
        padding-top: 160px !important;
        padding-bottom: 50px;
    }
    
    .hero h2 {
        font-size: 1.5rem;
        padding: 0;
        margin-top: 0;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0;
        margin-top: 0.3rem;
    }
    
    .hero-highlights {
        gap: 0.8rem;
        margin: 1.2rem 0;
    }
    
    .highlight-item {
        max-width: 110px;
    }
    
    .highlight-icon {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    .highlight-item p {
        font-size: 0.75rem;
    }
    
    .cta-buttons {
        margin-top: 0.8rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .section-title {
        font-size: 1.5rem;
        padding: 0 0.3rem;
    }
    
    .project-card {
        padding: 1rem;
    }
    
    .project-card h3 {
        font-size: 1.2rem;
    }
    
    .project-card p {
        font-size: 0.85rem;
    }
    
    .tech-icons {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        max-width: 100%;
        padding: 1rem;
    }
    
    .contact-link.email-link {
        font-size: 0.8rem;
        word-break: break-all;
    }
    
    .about-text {
        padding: 1rem;
    }
    
    .about-text h3 {
        font-size: 1.3rem;
    }
    
    .about-text p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .skill-category {
        padding: 1rem;
    }
    
    .skill-category h4 {
        font-size: 1rem;
    }
    
    .skill-category li {
        font-size: 0.85rem;
        line-height: 1.3;
    }
    
    .btn-primary,
    .btn-secondary {
        max-width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
    
    .collaboration-cta h3 {
        font-size: 1rem;
    }
    
    .collaboration-cta p {
        font-size: 0.8rem;
    }

    .certificates-container {
        margin-top: 130px !important;
    }

    .project-detail-container {
        margin-top: 130px !important;
    }
}

/* Экстремально маленькие устройства (до 360px) */
@media (max-width: 360px) {    
    .hero {
        padding-top: 180px !important;
    }
    
    .hero h2 {
        font-size: 1.3rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .highlight-item p {
        font-size: 0.7rem;
    }
    
    .cta-buttons {
        margin-top: 0.5rem !important;
        margin-bottom: 0.2rem !important;
    }
    
    .contact-link.email-link {
        font-size: 0.75rem;
        letter-spacing: -0.2px;
    }
    
    .about-text p {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    nav h1 {
        font-size: 1rem;
    }
    
    nav a {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }

    .certificates-container {
        margin-top: 120px !important;
    }

    .project-detail-container {
        margin-top: 120px !important;
    }
}

/* Ориентация landscape на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: 100px !important;
        padding-bottom: 40px;
    }
    
    nav {
        flex-direction: row;
        padding: 0.3rem 0.8rem;
    }
    
    nav ul {
        gap: 0.5rem;
    }
    
    .contact-links {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .contact-card {
        min-width: 160px;
    }
    
    .cta-buttons {
        margin-top: 0.8rem !important;
        margin-bottom: 0.3rem !important;
    }

    .certificates-container {
        margin-top: 100px !important;
    }

    .project-detail-container {
        margin-top: 100px !important;
    }
}

/* Улучшения для очень высоких устройств */
@media (min-width: 769px) and (max-width: 992px) {
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
}

/* iOS */
input,
textarea,
button {
    -webkit-appearance: none;
    border-radius: 0;
}

/* Страницы проектов */
.project-detail-container {
    max-width: 1200px;
    margin: 120px auto 50px;
    padding: 0 20px;
}

/* Страницы сертификатов */
.certificates-container {
    max-width: 1200px;
    margin: 120px auto 50px;
    padding: 0 20px;
}