/* Modern Minimalist Design */

/* Custom bio hyperlink style */
.bio-link {
    color: #60a5fa !important;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(96,165,250,0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.bio-link:hover {
    color: #93c5fd !important;
    border-bottom-color: #93c5fd;
}

/* Home page overlay styles */
.home-bg {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.home-bg .library-img {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.home-overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    background: var(--overlay-bg, rgba(10, 10, 15, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text, #e8e8f0);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 6vw 4vw 4vw 4vw;
    box-sizing: border-box;
    overflow-y: auto;
}

.home-overlay-text .about-passage {
    width: 100%;
    max-width: 1000px;
    background: var(--card-bg, rgba(255,255,255,0.03));
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.37), 0 0 60px rgba(96,165,250,0.05);
    padding: 4rem 3rem 3rem 3rem;
    margin: 2rem auto 0 auto;
    animation: fadeInUp 0.6s ease-out;
}

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

.home-overlay-text .about-passage p {
    font-size: 1.125rem;
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: var(--text);
    background: transparent;
    font-weight: 300;
    letter-spacing: 0.01em;
}

.home-overlay-text .about-passage p:first-of-type {
    font-size: 1.3rem;
    font-weight: 400;
    color: #60a5fa;
    margin-bottom: 2rem;
}

@media (max-width: 700px) {
    .home-overlay-text {
        padding: 8vw 2vw 4vw 2vw;
    }
    .home-overlay-text .about-passage {
        padding: 2.5rem 1.8rem 2rem 1.8rem;
        font-size: 1rem;
        margin: 4vw auto 0 auto;
    }
    .home-overlay-text .about-passage p:first-of-type {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .home-overlay-text {
        padding: 12vw 1vw 2vw 1vw;
    }
    .home-overlay-text .about-passage {
        padding: 2rem 1.2rem 1.5rem 1.2rem;
        font-size: 0.98rem;
        margin: 8vw auto 0 auto;
    }
    .home-overlay-text .about-passage p:first-of-type {
        font-size: 1.1rem;
    }
}

/* About page overlay styles */
.about-bg {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.about-bg-img {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 1;
}

.about-overlay-text {
    position: absolute;
    top: 0;
    right: 0;
    width: 70vw;
    height: 100vh;
    background: var(--overlay-bg, rgba(10, 10, 15, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text, #e8e8f0);
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4vw 6vw 4vw 4vw;
    box-sizing: border-box;
    overflow-y: auto;
}

.about-overlay-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #60a5fa;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.about-passage p {
    font-size: 1.125rem;
    margin-bottom: 1.5em;
    line-height: 1.8;
    background: transparent;
    color: var(--text);
    font-weight: 300;
}

.about-overlay-text .back-link {
    margin-top: 2rem;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 400;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid transparent;
}

.about-overlay-text .back-link:hover {
    color: #93c5fd;
    border-bottom-color: #93c5fd;
}

.desktop-contacts { display: block; }
.mobile-contacts { display: none; }
.contacts-mobile { display: none; }

.contact-icon {
    width: 1.5em;
    height: 1.5em;
    margin-right: 0.5em;
    vertical-align: middle;
    display: inline-block;
    transition: transform 0.3s ease;
}

.contacts {
    margin: 2.5rem 0 0 2vw;
    color: #e8e8f0;
    font-size: 1.05rem;
    font-family: 'Roboto', sans-serif;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 1.5rem 1.5rem 1.3rem 1.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    max-width: 240px;
    transition: all 0.3s ease;
}

.contacts:hover {
    box-shadow: 0 8px 32px rgba(96,165,250,0.15);
    border-color: rgba(96,165,250,0.2);
}

.contacts h3 {
    margin: 0 0 1.2rem 0;
    font-size: 1.2rem;
    color: #60a5fa;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.contact-item {
    margin-bottom: 0.9em;
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.contact-item:hover {
    transform: translateX(4px);
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
}

.contact-item span {
    font-size: 1.2em;
    margin-right: 0.3em;
}

.contact-item a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #60a5fa;
}

.book-icon {
    width: 48px;
    height: 48px;
    margin-right: 1em;
    vertical-align: middle;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    object-fit: cover;
    transition: all 0.3s ease;
}

.book-icon.gym-icon {
    object-fit: contain;
    padding: 4px;
}

/* Modern Base Styles */

:root {
    --bg: #0a0a0f;
    --overlay-bg: rgba(10, 10, 15, 0.85);
    --card-bg: rgba(255,255,255,0.03);
    --accent: #60a5fa;
    --text: #e8e8f0;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    color: #e8e8f0;
    font-family: 'Inter', 'Roboto', system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 300;
    letter-spacing: 0.01em;
}

/* Layout: modern three-column */
.library-layout {
    display: flex;
    flex-direction: row;
    max-width: 1600px;
    margin: 0 auto;
    width: 100vw;
    overflow: auto;
    align-items: flex-start;
}

.margin-column {
    width: 25vw;
    min-width: 0;
    display: block;
    padding: 2rem 1.5rem;
}

.left-column {
    width: 40vw;
    min-width: 350px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto;
    padding: 2rem 1rem;
}

.right-column {
    width: 60vw;
    display: flex;
    align-items: stretch;
}

/* Modern Bookshelf with Cards */
.bookshelf.vertical {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 98%;
    align-items: stretch;
    margin-bottom: 0;
}

.book {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
    color: var(--text, #e8e8f0);
    font-weight: 400;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.book::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(96,165,250,0.1) 0%, rgba(167,139,250,0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.book:hover::before {
    opacity: 1;
}

.book span {
    font-weight: 300;
    color: var(--muted, #9ca3af);
    font-size: 0.9rem;
    display: block;
    margin-top: 0.3rem;
}

.book:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(96,165,250,0.25);
    border-color: rgba(96,165,250,0.3);
}

.book:hover .book-icon {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(96,165,250,0.3);
}



/* Library Image */
.library-img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 900px) {
    .library-layout {
        flex-direction: column;
        height: auto;
    }
    
    .margin-column {
        display: none;
    }
    
    .left-column, .right-column {
        width: 100vw;
    }
    
    .bookshelf.vertical {
        width: 94%;
        margin: 1.5rem auto;
    }
    
    .library-img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
    
    .contacts {
        position: static;
    }
    
    .contacts-mobile {
        display: block;
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        margin: 2.5rem auto 2rem auto;
        border-radius: 20px;
        max-width: 94vw;
        padding: 1.5rem;
        z-index: 1;
        background: rgba(255,255,255,0.03);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    }
    
    body {
        padding-bottom: 120px;
    }
    
    .home-bg {
        height: auto;
        min-height: 100vh;
    }
    
    .home-overlay-text {
        position: relative;
        width: 100vw;
        height: auto;
        min-height: 100vh;
        padding: 6vw 4vw 6vw 4vw;
        align-items: center;
        justify-content: flex-start;
        overflow-y: auto;
        z-index: 10;
        display: flex;
        background: var(--overlay-bg, rgba(10, 10, 15, 0.85));
    }
    
    .about-passage {
        max-width: 100vw;
        display: block;
        min-height: 120px;
        background: rgba(255,255,255,0.03);
        color: var(--text, #e8e8f0);
        z-index: 11;
        position: relative;
    }
}

/* Large screens polish */
@media (min-width: 1400px) {
    .margin-column {
        padding-left: 4rem;
    }
    
    .bookshelf.vertical {
        width: 85%;
    }
}

/* Powerlifting Curve Image */
.project-curve-image {
    width: 100%;
    max-width: 750px;
    margin: 2.5rem auto 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.project-curve-image img {
    width: 100%;
    max-width: 750px;
    height: 320px;
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-curve-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 48px rgba(96,165,250,0.2);
}

.curve-desc {
    color: var(--muted, #9ca3af);
    margin-top: 1rem;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 300;
}
