/**
 * About Page Styles
 * Simple styling matching the navigation font (OCR-A monospace)
 */

/* Wrapper for centering content */
.about-wrapper {
    min-height: 100vh;
    padding: 180px 0 40px 0; /* Top padding for nav bar */
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Main container - flexbox for side-by-side layout */
.about-container {
    display: flex;
    gap: clamp(1.25rem, 6vw, 3.75rem); /* 20px to 60px fluid scaling */
    width: 100%;
    max-width: 1400px;
    align-items: center;
    padding: clamp(0, 4vw, 2.5rem); /* 0 to 40px fluid scaling */
}

/* Bio section - LEFT on desktop */
.about-bio {
    flex: 1;
    order: 1;
    font-family: var(--font-mono);
    color: #FFB700;
    font-size: 14px;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Align to left to prevent layout shift */
    text-align: left;
}

/* Photo section - RIGHT on desktop */
.about-photo {
    flex: 0 0 auto;
    order: 2;
    min-height: 400px;
    min-width: 300px; /* Reserve space before image loads */
    max-width: 50%;
}

/* Photo image - reserve space before loading */
.about-photo-img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    display: block;
}

/* Photo placeholder when no photo */
.about-photo-placeholder {
    color: var(--color-gray, #808080);
    font-family: var(--font-mono);
    font-size: 12px;
}

/* Mobile: Photo TOP, Bio BOTTOM */
@media screen and (max-width: 768px) {
    .about-wrapper {
        padding: 80px 20px 20px 20px;
    }

    .about-container {
        flex-direction: column;
        text-align: center;
    }

    .about-photo {
        order: 1; /* Photo first (top) */
        flex: none;
        width: 100%;
        max-width: 400px;
        min-width: unset; /* Remove reserved width on mobile */
        min-height: unset; /* Remove reserved height on mobile */
        margin: 0 auto;
    }

    .about-bio {
        order: 2; /* Bio second (bottom) */
        align-items: center; /* Center on mobile */
    }
}

/* Loading state */
.about-loading {
    color: var(--color-gray, #808080);
    font-family: var(--font-mono);
    font-size: 14px;
}

/* Error state */
.about-error {
    color: var(--color-accent, #ff3030);
    font-family: var(--font-mono);
    font-size: 14px;
}

/* Bio content styling (markdown rendered) */
.about-bio-content {
    font-family: var(--font-mono);
    color: #FFB700;
    max-width: 500px;
    text-align: left;
}

.about-bio-content h1,
.about-bio-content h2,
.about-bio-content h3 {
    font-family: var(--font-mono);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 400;
    color: #FFB700;
}

.about-bio-content h1 {
    font-size: 24px;
    margin-top: 0;
}

.about-bio-content h2 {
    font-size: 18px;
}

.about-bio-content h3 {
    font-size: 16px;
}

.about-bio-content p {
    margin-bottom: 1em;
}

.about-bio-content a {
    color: var(--color-yellow, #ffff00);
    text-decoration: none;
}

.about-bio-content a:hover {
    text-decoration: underline;
}

/* Admin controls */
.about-admin-controls {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-gray, #808080);
}

.about-edit-btn,
.about-upload-btn,
.about-save-btn,
.about-cancel-btn {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 16px;
    border: 1px solid var(--color-white, #ffffff);
    background: transparent;
    color: var(--color-white, #ffffff);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.about-edit-btn:hover,
.about-upload-btn:hover,
.about-save-btn:hover {
    background: var(--color-white, #ffffff);
    color: var(--color-bg, #000000);
}

.about-cancel-btn {
    border-color: var(--color-gray, #808080);
    color: var(--color-gray, #808080);
    margin-left: 10px;
}

.about-cancel-btn:hover {
    background: var(--color-gray, #808080);
    color: var(--color-bg, #000000);
}

/* Edit mode */
.about-edit-container {
    width: 100%;
}

.about-edit-textarea {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    background: var(--color-bg, #000000);
    color: var(--color-white, #ffffff);
    border: 1px solid var(--color-gray, #808080);
    resize: vertical;
    box-sizing: border-box;
}

.about-edit-textarea:focus {
    outline: none;
    border-color: var(--color-white, #ffffff);
}

.about-edit-actions {
    margin-top: 15px;
}

/* Photo admin controls */
.about-photo-admin {
    margin-top: 15px;
}

.about-upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   ADDITIONAL RESPONSIVE DESIGN
   ============================================ */
@media screen and (max-width: 480px) {
    .about-wrapper {
        padding: 60px 15px 15px 15px;
    }

    .about-bio-content {
        font-size: 13px;
    }

    .about-bio-content h1 {
        font-size: 20px;
    }

    .about-bio-content h2 {
        font-size: 16px;
    }

    .about-bio-content h3 {
        font-size: 14px;
    }

    .about-edit-btn,
    .about-upload-btn,
    .about-save-btn,
    .about-cancel-btn {
        font-size: 11px;
        padding: 6px 12px;
    }
}

/* Mobile Landscape View */
@media screen and (max-height: 450px) and (orientation: landscape) {
    .about-wrapper {
        padding: 50px 15px 15px 15px;
        min-height: auto;
    }

    .about-container {
        flex-direction: row;
        gap: 20px;
        align-items: flex-start;
    }

    .about-photo {
        order: 2;
        max-width: 200px;
        min-height: unset;
        min-width: unset;
    }

    .about-bio {
        order: 1;
        flex: 1;
    }

    .about-bio-content {
        font-size: 12px;
        max-width: none;
    }

    .about-bio-content h1 {
        font-size: 18px;
    }
}

/* Touch device detection - disable hover effects */
@media (hover: none) and (pointer: coarse) {
    .about-bio-content a:hover {
        text-decoration: none;
    }

    .about-edit-btn:hover,
    .about-upload-btn:hover,
    .about-save-btn:hover,
    .about-cancel-btn:hover {
        background: transparent;
        color: var(--color-white, #ffffff);
    }
}
