/* --- Design Variables --- /* --- Design Variables --- */
:root {
    --royal-blue: #0a369d;
    --dark-blue: #051c52;
    --gold: #ffc107;
    --dark-gold: #b38600;
    --light-gold: #fff9e6;
    --bg-light: #f8f9fa;
    --text-dark: #1a1a1a; /* Enhanced contrast */
    --text-muted: #2d3748; /* Enhanced contrast */
}

/* --- Base Setup --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 19px; 
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* FIXED: Prevent container from causing horizontal scroll */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem; /* Snugger padding for tight mobile screens */
}

@media (min-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* --- Header & Navigation --- */
.main-header {
    background-color: var(--royal-blue);
    color: white;
    padding: 2rem 0;
    border-bottom: 5px solid var(--gold);
    width: 100%; /* Ensure it spans full viewport width */
}

.header-flex {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


/* Desktop layout adjustment for navbar */
@media (min-width: 768px) {
    .header-flex {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 2rem; /* Adds comfortable breathing room between logo area and links */
    }

    .logo-area {
        flex-direction: row;
        text-align: left;
        gap: 1.5rem;
        flex: 1; /* Tells the browser this area can take up the available middle room */
        min-width: max-content; /* Prevents the logo text from ever being scrunched */
    }

    .tsco-logo {
        width: 95px;
        height: 95px;
    }
    
    .slogan {
        margin-top: 0; /* Aligns smoothly with the text line on desktop viewports */
        white-space: nowrap; /* Strictly forbids words from forcing onto new lines on desktop */
    }

    .main-nav {
        flex-direction: row;
        width: auto;
        gap: 1rem;
    }
    .main-nav a {
        padding: 0.5rem 1rem;
        background-color: transparent;
        border-radius: 0;
        border-bottom: 2px solid transparent;
    }
    .main-nav a:hover, .main-nav a:focus {
        color: var(--gold);
        background-color: transparent;
        border-bottom: 2px solid var(--gold);
    }
}

@media (min-width: 480px) {
    .logo-area h1 {
        font-size: 2.2rem;
    }
}

/* .logo-area h1 { */
/*     font-size: 2.2rem; */
/*     font-weight: 800; */
/*     letter-spacing: -0.5px; */
/*     line-height: 1.2; */
/* } */

.logo-area h1 {
    font-size: 1.8rem; /* Scaled down for mobile footprints */
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.slogan {
    color: var(--gold);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.4rem;
}

/* FIXED: Mobile-first navigation buttons that don't bunch up */
.main-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    text-align: center;
    border: 2px solid transparent;
    font-size: 1.1rem; /* Slightly larger tap target font */
}

.main-nav a:hover, .main-nav a:focus {
    color: var(--dark-blue);
    background-color: var(--gold);
}


/* --- Content Markdown Styling --- */
/* FIXED: Adjusted mobile padding so card content fits beautifully */
.main-content {
    background: white;
    padding: 2rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    word-wrap: break-word; /* Prevents long links or text from pushing layout */
}

/* @media (min-width: 600px) { */
/*     .main-content { */
/*         padding: 3rem 2.5rem; */
/*         margin: 2.5rem 0; */
/*     } */
/* } */

@media (min-width: 480px) {
    .main-content h2 {
        font-size: 1.8rem;
    }
}

/* Automatically target markdown elements */
/* .main-content h2 { */
/*     color: var(--dark-blue); */
/*     font-size: 1.8rem; */
/*     margin-top: 2.5rem; */
/*     margin-bottom: 1rem; */
/*     border-bottom: 3px solid var(--gold); */
/*     padding-bottom: 0.3rem; */
/* } */

.main-content h2 {
    color: var(--dark-blue);
    font-size: 1.5rem; /* Prevents "About Christian" from clipping out */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--gold);
    padding-bottom: 0.3rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.main-content h2:first-of-type {
    margin-top: 0;
}

.main-content h3 {
    color: var(--royal-blue);
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.main-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.main-content ul {
    margin-bottom: 2rem;
    padding-left: 1.25rem;
}

.main-content li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

/* Premium Tech Card styling */
.tech-card {
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-left: 6px solid var(--royal-blue);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.badge {
    background-color: #edf2f7;
    color: var(--dark-blue);
    font-size: 0.85rem;
    font-weight: bold;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #cbd5e0;
}

/* --- Callout Box / Contact Section styling --- */
.main-content blockquote {
    background-color: var(--light-gold);
    border-left: 6px solid var(--gold);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.main-content blockquote p {
    margin-bottom: 0.75rem;
    color: var(--dark-blue);
    font-weight: 600;
}

.main-content blockquote p:last-child {
    margin-bottom: 0;
}

.main-content blockquote a {
    color: var(--royal-blue);
    text-decoration: underline;
    font-weight: bold;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--dark-blue);
    color: #a0aec0;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    width: 100%;
}

/* --- Header Logo Integration --- */
.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.tsco-logo {
    width: 110px;        /* Controlled, highly legible size */
    height: 110px;       /* Forces square proportion preservation */
    object-fit: contain;
    background-color: #ffffff;
    padding: 6px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- Bulletproof Profile Image Centering & Mobile Fix --- */
.main-content img {
    display: block !important;
    margin: 2rem auto !important;   /* Centers horizontally on mobile viewports */
    width: 100% !important;          /* Scales down to fit phone screens flawlessly */
    max-width: 340px !important;     /* Keeps it looking sharp and professional */
    height: auto !important;         /* Prevents stretching or squishing */
    border-radius: 12px !important;  /* Softens the edges for your audience */
    box-shadow: 0 6px 16px rgba(5, 28, 82, 0.15) !important;
}
