/* Шрифт */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400..800&display=swap');

/* Общие стили */
body {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    background-color: #f6f5f0;
    color: black;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-weight: 700;
    text-align: center;
}

strong, em {
    font-weight: 800;
    font-style: italic;
}

/* Темная тема */
.dark-mode {
    background-color: #121212;
    color: white;
}

.dark-mode .about-me,
.dark-mode header {
    background-color: #121212;
}

.dark-mode .about-text p {
    color: #ccc;
}

.dark-mode .about-text h2,
.dark-mode .footer-contact,
.dark-mode .phone-number,
.dark-mode .email {
    color: white;
}

.dark-mode footer {
    background: linear-gradient(to top, rgba(18,18,18,0.9), rgba(30,30,30,0.6), rgba(18,18,18,0.2), #121212);
    color: white;
}

.dark-mode .footer-icons img,
.dark-mode .logo img,
.dark-mode .social-icons img {
    filter: brightness(0) invert(1);
}

.dark-mode .video-frame {
    background: #1e1e1e;
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

.dark-mode .video-caption {
    color: #bbb;
}

.dark-mode button {
    background: #333;
    color: #fff;
    border: 1px solid #555;
}

.dark-mode a {
    color: #4da8da;
}

/* Кнопка смены темы */
#theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#theme-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    transition: opacity 0.3s ease-in-out;
}

/* Хеддер */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15), #f6f5f0);
}

.logo img {
    width: 200px;
    height: auto;
    margin-top: 30px;
}

/* Соцсети */
.social-icons {
    position: absolute;
    left: 40px;
    top: 60%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-icons img {
    width: 30px;
    height: auto;
    transition: transform 0.2s ease;
}

.social-icons img:hover {
    transform: scale(1.1);
}

/* Контент */
.main-content {
    text-align: center;
    padding: 20px;
}

h2 {
    font-size: 28px;
    font-weight: bold;
    margin: 40px 0 20px 0;
}

/* Блок обо мне */
.about-me {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background-color: #f6f5f0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.photo-wrapper {
    position: relative;
    transform: rotate(-5deg);
    box-shadow: 10px 10px 20px rgba(0,0,0,0.2);
}

.about-photo {
    display: block;
    width: 200px;
    height: auto;
}

.photo-signature {
    position: absolute;
    bottom: -20px;
    right: -45px;
    width: 250px;
    opacity: 0.9;
}

.about-text {
    max-width: 400px;
}

.about-text h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.about-text p {
    font-size: 16px;
    color: #555;
}

/* Видео */
.section {
    text-align: center;
    margin-bottom: 40px;
}

.video-container {
    column-count: 3; /* можно поменять на 2 или 4 для адаптивности */
    column-gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.video-frame {
    display: inline-block;
    width: 100%;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #ddd;
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    break-inside: avoid;
}

.video-frame:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-frame video,
.video-frame img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* Если хочешь немного подогнать высоту вручную — можешь оставить */
.video-frame.vertical {
    aspect-ratio: 9 / 16;
}

.video-frame.horizontal {
    aspect-ratio: 16 / 9;
}

.video-caption-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.video-caption {
    width: 100%;
    max-width: 500px;
    font-size: 16px;
    color: #333;
    text-align: left;
    margin-top: 10px;
}


/* Модалка */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 900px;
    background: black;
    border-radius: 10px;
    overflow: hidden;
}

#modalVideo {
    width: 100%;
    height: 500px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: white;
    cursor: pointer;
}

/* Футер */
footer {
    background: linear-gradient(to top, rgba(0,0,0,0.15), #f6f5f0);
    color: #333;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-contact {
    margin-bottom: 10px;
}

.phone-number {
    font-family: 'EB Garamond', sans-serif;
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.email {
    font-family: 'EB Garamond', serif;
    font-size: 24px;
    color: #333;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.footer-icons img {
    width: 40px;
    height: auto;
}

/* Адаптив */
@media (max-width: 768px) {
    .social-icons {
        left: 20px;
        gap: 10px;
    }

    .social-icons img {
        width: 24px;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .photo-wrapper {
        transform: none;
    }

    .photo-signature {
        bottom: -10px;
        right: -20px;
        width: 200px;
    }

    .video-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .video-frame {
        width: 350px;
        height: auto;
    }

    .video-caption {
        width: 350px;
    }

    .phone-number {
        font-size: 24px;
    }

    .email {
        font-size: 20px;
    }

    .footer-icons {
        gap: 10px;
    }

    .footer-icons img {
        width: 30px;
    }
}
