/* css/base.css */
/* Reset and base styles */
*, *::before, *::after {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* Disable scrolling */
    font-family: 'Intel One Mono', monospace;
    font-weight: 500; /* Medium weight for general text */
    /* Removed text-transform: lowercase to allow normal capitalization */
    position: relative;
    background-color: #ffffff; /* Vintage cream background */
}

/* Make h1 elements bold and uppercase */
h1 {
    font-weight: 700; /* Bold for h1 */
    text-transform: uppercase;
}

/* Direct logo styling - consistent for all pages */
.logo-link {
    position: fixed;
    top: 0px; /* Positioned at the very top edge */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex; /* Better for centering and alignment */
    justify-content: center;
    align-items: flex-start;
    padding: 0; /* Ensure no additional padding is applied */
    margin: 0; /* Ensure no margins are applied */
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.top-logo {
    height: 50px; /* Consistent height for all logos */
    width: auto;
    display: block;
    opacity: 1; /* Ensure the logo is fully visible */
    object-fit: contain; /* Ensure the image fits within bounds */
    max-width: 90vw; /* Prevent from being too wide on mobile */
}

/* Special styling for the index page logo - reduced by 35% total (15% + additional 20%) */
.index-logo {
    height: 34px; /* Reduced by additional 20% from 42.5px (total reduction: 35% from original 50px) */
    width: auto; /* Let width adjust based on height to maintain aspect ratio */
    object-fit: contain; /* Ensure proper fitting */
    transform: none; /* No transformation needed */
    margin-top: 5px; /* Adjusted margin to position logo another 5px higher */
}

.background-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #ffffff;
    background-image: url('../img/desktop.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}


/* Bottom navigation menu */
.bottom-menu {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(51, 51, 51, 0.9);
    padding: 15px 30px;
    border-radius: 8px;
    backdrop-filter: blur(3px);
}

.bottom-menu nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.bottom-menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: opacity 0.3s ease;
    position: relative;
}

.bottom-menu a:hover {
    opacity: 0.7;
}

.bottom-menu a.active {
    color: #dadada;
}

.bottom-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #dadada;
}

/* Separator between menu items */
.bottom-menu nav a:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -15px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 300;
}

.bottom-menu nav a.active:not(:last-child)::after {
    content: '|';
    color: rgba(255, 255, 255, 0.4);
}

/* Modal for displaying full content */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #dadada;
    padding: 40px;
    border-radius: 12px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 0 0 3px #333333,
        0 0 0 6px #ffffff,
        0 0 0 9px #666666,
        0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: justify; /* Justify text for better readability */
    line-height: 1.5; /* Improve line spacing */
}

/* Modal content paragraphs */
.modal-content p {
    margin-bottom: 16px;
}

.modal h2 {
    margin-top: 0;
    color: #333333;
    margin-bottom: 20px;
}

/* Styling for article content in modals */
.article-content {
    text-align: justify;
}

.article-content p {
    margin-bottom: 16px;
    line-height: 1.6;
}

.reference-quote {
    font-style: italic;
    font-size: 0.9em;
    color: #505050;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #aaaaaa;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: #ffffff;
    cursor: pointer;
}

/* Lenovo Tab M10 Plus 3rd Gen optimization */
@media (min-width: 601px) and (max-width: 768px) {
    .background-svg {
        background-position: center center;
    }
    
    /* Bottom menu optimized for tablet */
    .bottom-menu {
        padding: 12px 20px;
        bottom: 20px;
    }
    
    .bottom-menu nav {
        gap: 20px;
    }
    
    .bottom-menu a {
        font-size: 13px;
    }
    
    /* Modal adjustments */
    .modal-content {
        max-width: 85%;
        padding: 25px;
    }
    
    .modal h2 {
        font-size: 20px;
    }
    
    /* Logo adjustments */
    .top-logo {
        height: 40px;
    }
    
    .index-logo {
        height: 30px;
    }
}

/* Mobile phone sizes */
@media (max-width: 600px) {
    .background-svg {
        background-image: url('../img/mobile.png');
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
    }
    
    /* Mobile modal styling */
    .modal-content {
        padding: 25px;
        max-width: 95%;
    }
    
    .modal h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .article-content {
        text-align: justify;
        font-size: 14px;
    }
    
    .article-content p {
        margin-bottom: 12px;
        line-height: 1.5;
    }
    
    .reference-quote {
        font-size: 0.85em;
        margin-top: 20px;
        padding-top: 12px;
    }
    
    .close-modal {
        top: 10px;
        right: 15px;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .background-svg {
        background-position: center center;
    }
    
    /* Bottom menu adjustments for tablets */
    .bottom-menu {
        padding: 12px 25px;
    }
    
    .bottom-menu nav {
        gap: 25px;
    }
    
    /* Modal adjustments for tablets */
    .modal-content {
        max-width: 90%;
        padding: 30px;
    }
    
    /* Logo adjustments for tablets */
    .top-logo {
        height: 45px;
    }
    
    .index-logo {
        height: 32px;
    }
}

/* Large screens */
@media (min-width: 1025px) {
    .background-svg {
        background-attachment: fixed;
    }
}
