/* Responsive 2-column layout with system.css styling */

/* Only essential layout styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Menu Bar */
.menu-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Single Column Layout */
.main-content {
    display: block;
    width: 100%;
}

/* Bio-Contact Parent Container */
.bio-contact-parent {
    margin-bottom: 0px !important;
}

/* Bio-Contact 2-Column Layout with Equal Heights using CSS Grid */
.bio-contact-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 20px;
    grid-template-rows: 1fr; /* This forces equal row heights */
}

.bio-column,
.contact-column {
    display: flex;
    flex-direction: column;
}

.bio-column .bio-window,
.contact-column .contact-window {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

.bio-column .bio-window .window-pane,
.contact-column .contact-window .window-pane {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}

/* Column styling handled by grid layout */

/* Window sizing for responsive layout */
.main-window {
    width: 100%;
    margin-bottom: 20px;
}

.about-window,
.skills-window,
.categories-window,
.bio-window,
.interests-window,
.pictures-window,
.contact-window {
    width: 100%;
    margin-bottom: 15px;
}

/* COMPREHENSIVE SPACING RESET */
.primary-column {
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset all window margins and apply consistent spacing */
.window {
    margin-top: 0 !important;
    margin-bottom: 25px !important;
}

/* Specific overrides for our layout */
.bio-window,
.contact-window {
    margin-bottom: 0 !important;
}

.interests-window {
    margin-top: 15px !important;
    margin-bottom: 30px !important;
}

.pictures-window {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
}

/* Three-column responsive grid */
.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.three-column-grid .column {
    min-width: 0;
}

/* Image placeholder styling */
.image-placeholder {
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 40px 20px;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.image-placeholder p {
    margin: 0 0 5px 0;
    font-weight: bold;
    color: #666;
}

.image-placeholder small {
    color: #999;
    font-style: italic;
}

/* Image container styling */
.image-container {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* Maintains aspect ratio and fits within container */
    max-width: 100%;
}

/* Simple Map Styling */
.simple-map {
    margin-top: 15px;
    width: 100%;
}

.map-container {
    position: relative;
    width: 100%;
    height: 120px;
    border: 2px solid #6c757d;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
}

.map-iframe {
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(100%) contrast(2.0) brightness(0.8);
    -webkit-filter: grayscale(100%) contrast(2.0) brightness(0.8);
    display: block;
}

.map-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    z-index: 1;
}

/* Page styling with classic old-school gray background */
body {
    overflow-y: scroll;
    background: #c0c0c0; /* Fallback for older browsers */
    background: -webkit-linear-gradient(135deg, #c0c0c0 0%, #d0d0d0 100%); /* Chrome 10-25, Safari 5.1-6 */
    background: -moz-linear-gradient(135deg, #c0c0c0 0%, #d0d0d0 100%); /* Firefox 3.6-15 */
    background: -o-linear-gradient(135deg, #c0c0c0 0%, #d0d0d0 100%); /* Opera 11.10-11.50 */
    background: linear-gradient(135deg, #c0c0c0 0%, #d0d0d0 100%); /* Modern browsers */
    min-height: 100vh;
}

/* Remove scrollbars from main windows */
.bio-window,
.interests-window,
.pictures-window,
.contact-window {
    overflow: visible !important;
    height: auto !important;
}

.bio-window .window-pane,
.interests-window .window-pane,
.pictures-window .window-pane,
.contact-window .window-pane {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* Hide webkit scrollbars for main windows */
.bio-window::-webkit-scrollbar,
.interests-window::-webkit-scrollbar,
.pictures-window::-webkit-scrollbar,
.contact-window::-webkit-scrollbar,
.project-window::-webkit-scrollbar,
.article-window::-webkit-scrollbar,
.article-reading-window::-webkit-scrollbar,
.bio-window .window-pane::-webkit-scrollbar,
.interests-window .window-pane::-webkit-scrollbar,
.pictures-window .window-pane::-webkit-scrollbar,
.contact-window .window-pane::-webkit-scrollbar,
.project-window .window-pane::-webkit-scrollbar,
.article-window .window-pane::-webkit-scrollbar,
.article-reading-window .window-pane::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
}

/* Firefox scrollbar hiding */
.bio-window,
.interests-window,
.pictures-window,
.contact-window,
.project-window,
.article-window,
.article-reading-window,
.bio-window .window-pane,
.interests-window .window-pane,
.pictures-window .window-pane,
.contact-window .window-pane,
.project-window .window-pane,
.article-window .window-pane,
.article-reading-window .window-pane {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.button-group {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}


/* Projects Page Layout */
.projects-main-content {
    width: 100%;
}

.projects-header {
    text-align: center;
    margin-bottom: 30px;
}

.projects-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.projects-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.projects-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Writings Page Layout */
.writings-main-content {
    width: 100%;
}

.writings-header {
    text-align: center;
    margin-bottom: 30px;
}

.writings-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.writings-two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.writings-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Remove scrollbars from project and article windows */
.project-window,
.project-window .window-pane,
.article-window,
.article-window .window-pane,
.article-reading-window,
.article-reading-window .window-pane {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
}

/* Button with icon - inherits from .btn styling */
.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-with-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Project and article actions */
.project-actions,
.article-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* Article reading page styling */
.article-reading-window {
    max-width: 800px;
    margin: 20px auto;
}

.article-content {
    line-height: 1.6;
    font-size: 14px;
    font-family: "MS Sans Serif", sans-serif;
}

.article-content h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #000;
    font-family: "MS Sans Serif", sans-serif;
}

.article-content h3 {
    font-size: 16px;
    margin: 20px 0 10px 0;
    color: #000;
    font-family: "MS Sans Serif", sans-serif;
}

.article-content p {
    margin-bottom: 15px;
    text-align: justify;
    font-family: "MS Sans Serif", sans-serif;
}

.article-content em {
    font-style: italic;
    color: #666;
    font-family: "MS Sans Serif", sans-serif;
}

/* Tablet responsive */
@media (max-width: 1024px) {
    .container {
        max-width: 100%;
    }
    
    .menu-bar {
        flex-direction: column;
        gap: 5px;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    /* Container padding for consistent margins */
    .container {
        padding: 15px !important;
        box-sizing: border-box !important;
    }
    
    /* Bio-Contact layout becomes flexbox on mobile */
    .bio-contact-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    
    .bio-column,
    .contact-column {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
    
    .bio-column .bio-window,
    .contact-column .contact-window {
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Force all windows to have consistent constraints */
    .window {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 25px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    /* Specific window types */
    .bio-window,
    .interests-window,
    .pictures-window,
    .contact-window,
    .project-window,
    .article-window {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 25px !important;
        box-sizing: border-box !important;
    }
    
    /* Window content constraints */
    .window-pane {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
    
    /* Responsive 3-column grid */
    .three-column-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Reduce image placeholder size on mobile */
    .image-placeholder {
        padding: 30px 15px !important;
        min-height: 100px !important;
    }
    
    /* Main content containers */
    .main-content,
    .projects-main-content,
    .writings-main-content {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Projects mobile responsive */
    .projects-two-column {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .projects-header h1 {
        font-size: 2em !important;
    }
    
    /* Writings mobile responsive */
    .writings-two-column {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .writings-header h1 {
        font-size: 2em !important;
    }
}
