:root {
    --primary: #035e26ad;
    --secondary: #ff7e6b;
    --bg: #f5fdfd;
    --text: #333;
    --card-bg: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    overflow: hidden; /* Убираем скролл на всей странице */
}

.card {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 850px;
    width: 100%;
    display: flex;
    max-height: 95vh; /* Ограничиваем высоту карточки */
}

.profile {
    background: linear-gradient(135deg, var(--primary) 0%, #7ad6d1 100%);
    color: white;
    padding: 30px;
    text-align: center;
    width: 35%;
    display: flex;
    flex-direction: column;
    justify-content: top;
}

.photo {
    width: 240px;
    height: 550px;
    border-radius: 0%;
    border: 5px solid white;
    object-fit: cover;
    object-position: -110px 50%;
}

h1 {
    margin: 10px 0 5px;
    font-size: 1.8rem;
}

.title {
    margin: 0;
    font-weight: 300;
    opacity: 0.9;
}

.info {
    padding: 30px;
    width: 65%;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Добавляем скролл только внутри инфо-блока при необходимости */
    max-height: 100%;
}

.section {
    margin-bottom: 25px;
}

h2 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills {
    list-style: none;
    padding: 0;
}

.skills li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.skills li:last-child {
    border-bottom: none;
}

.contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contacts a {
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 5px;
    transition: all 0.3s;
}

.contacts a:hover {
    background-color: rgba(94, 200, 194, 0.1);
    color: var(--primary);
    transform: translateX(5px);
}

.contacts i {
    width: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        height: auto;
        overflow: auto;
    }
    
    .card {
        flex-direction: column;
        max-height: none;
    }
    
    .profile, .info {
        width: 100%;
    }
    
    .profile {
        padding: 20px;
    }
    
    .photo {
        width: 120px;
        height: 120px;
    }
}
