/* --- 1. Global Config & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-color: #1A365D;
    --accent-color: #2B6CB0;
    --dark-bg: #111;
    --light-bg: #F7FAFC;
    --text-main: #2D3748;
    --text-muted: #718096;
    --card-bg: #FFFFFF;
}

/* --- 2. Global Base Styles --- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.7;
}

/* Custom highlight colors when a user selects text */
::selection {
    background-color: #EBF8FF; 
    color: var(--primary-color);
}

h3 {
    margin: 0 0 5px 0;
    color: var(--text-main);
    font-size: 1.15rem;
    font-weight: 600;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

.meta-info {
    font-style: normal;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 0;
    margin-bottom: 15px;
}

/* --- 3. Animations --- */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* --- 4. Shared Navigation Components --- */
.nav-links {
    margin-top: 30px;
    font-size: 1.2rem;
}

.nav-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    margin-right: 20px;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary-color);
}

/* --- 5. Traditional Resume Layout Styles --- */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 50px 20px 60px 20px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.1rem;
    font-weight: 600;
    color: #A0AEC0;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 5px;
    margin-bottom: 25px;
}

.linkedin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.linkedin-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.container {
    max-width: 850px;
    margin: -40px auto 40px auto;
    padding: 40px;
    background: var(--card-bg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    position: relative;
}

h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
}

#summary h2 {
    margin-top: 0;
}

.job {
    margin-bottom: 30px;
}

.edu-item {
    margin-bottom: 20px;
}

.cert-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.cert-list li {
    background: #EBF8FF; 
    color: var(--accent-color);
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.visitor-counter {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* --- 6. Minimal Layout Styles (Homepage & Subpages) --- */
.minimal-body {
    display: flex;
    flex-direction: column; 
    min-height: 100vh; /* Fallback for older browsers */
    min-height: 100dvh; /* Dynamic rendering height for mobile web viewports */
    margin: 0;
    background-color: var(--light-bg);
    color: var(--text-main);
}

.minimal-container {
    max-width: 750px; 
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 8vh 20px 40px 20px; 
    line-height: 1.8;
    animation: fadeIn 0.6s ease-out forwards; 
}

.minimal-container.wide {
    max-width: 750px;
}

.minimal-name {
    font-size: 2.4rem; 
    color: var(--primary-color);
    font-weight: 700;
    margin: 0 0 2px 0;
}

.minimal-name::after {
    content: '.';
    color: var(--accent-color);
}

.minimal-title {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 25px 0;
    letter-spacing: 0.5px;
}

.minimal-text {
    font-size: 1.05rem;
    margin-bottom: 35px;
    border-left: 3px solid var(--accent-color);
    padding-left: 18px;
    color: #4A5568; 
}

.minimal-nav a {
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.minimal-nav a:hover {
    color: var(--primary-color);
    transform: translateY(-2px); 
}

.minimal-nav a:hover::after {
    transform: translateY(2px);
}

.minimal-nav a:not(:last-child)::after {
    content: '/';
    color: #CBD5E0;
    margin-left: 25px;
    display: inline-block;
    pointer-events: none; 
    transition: transform 0.2s ease;
}

.minimal-footer {
    margin-top: auto; 
    padding: 40px 20px 25px 20px; 
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.5;
}

.category-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 2px solid #E2E8F0;
    padding-bottom: 10px;
    margin-bottom: 30px;
    margin-top: 0;
}

/* --- 7. Mobile Responsiveness --- */
@media (max-width: 650px) {
    .minimal-container {
        padding: 4vh 24px 30px 24px; 
    }

    .minimal-name {
        font-size: 2.1rem; 
    }

    .minimal-text {
        padding-left: 14px;
        margin-bottom: 25px;
    }
    
    /* FORCE LINKS TO STAY ON ONE LINE AND TIGHTEN SPACING */
    .minimal-nav {
        white-space: nowrap; /* Prevents the menu from breaking under any circumstance */
    }

    .minimal-nav a {
        margin-right: 10px; /* Clean, comfortable spacing for mobile viewports */
        font-size: 1rem;
    }

    .minimal-nav a:not(:last-child)::after {
        margin-left: 10px; 
    }

    /* GUARANTEES VISIBILITY ON MOBILE UI CHROMES */
    .minimal-footer {
        padding: 30px 20px 35px 20px; /* Clear safety margin for native mobile navbar UI indicators */
    }
}

/* --- 8. Project Action Links (Call-to-Action) - Aggressive Override --- */
p.minimal-text.project-cta {
    margin-top: 20px !important; 
    margin-bottom: 0 !important; 
    border-left: none !important;
    padding-left: 0 !important;
}

p.minimal-text.project-cta + p.minimal-text.project-cta {
    margin-top: 8px !important; 
}

/* --- 9. Smooth Expand/Collapse Animation --- */
details[open] summary ~ div {
    animation: fadeIn 0.4s ease-out forwards;
}

/* --- 10. Project Screenshot Lightbox --- */
.screenshot-link {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: zoom-in;
}

.screenshot-link img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-link:hover img,
.screenshot-link:focus-visible img {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(26, 54, 93, 0.14);
}

.image-lightbox {
    align-items: center;
    bottom: 0;
    display: none;
    justify-content: center;
    left: 0;
    padding: 32px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.image-lightbox:target {
    display: flex;
}

.image-lightbox__backdrop {
    background: rgba(17, 24, 39, 0.82);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.image-lightbox__content {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    max-height: 90vh;
    max-width: min(1180px, 94vw);
    padding: 14px;
    position: relative;
    width: 100%;
}

.image-lightbox__content img {
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    display: block;
    height: auto;
    max-height: 78vh;
    object-fit: contain;
    width: 100%;
}

.image-lightbox__caption {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 10px 44px 0 2px;
}

.image-lightbox__close {
    align-items: center;
    background: var(--primary-color);
    border-radius: 999px;
    color: #FFFFFF;
    display: inline-flex;
    font-size: 1.35rem;
    height: 34px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 12px;
    text-decoration: none;
    top: 12px;
    width: 34px;
}

.image-lightbox__close:hover,
.image-lightbox__close:focus-visible {
    background: var(--accent-color);
}
