/* --- CSS Variables --- */
:root {
    --bg-dark: #1f2833; 
    --bg-medium: #2c3e50; 
    --text-light: #c5c8c6; 
    --text-accent: #66fcf1; 
    --text-primary: #ffffff; 
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-code: 'IBM Plex Mono', monospace;
}

body.theme-light { --bg-dark: #ffffff; --bg-medium: #f4f4f4; --text-light: #555555; --text-accent: #007acc; --text-primary: #000000; }
body.theme-pastel { --bg-dark: #f5f0e1; --bg-medium: #ffffff; --text-light: #5d5d5d; --text-accent: #e67e22; --text-primary: #2c3e50; }
body.theme-cool { --bg-dark: #2f3640; --bg-medium: #485460; --text-light: #dcdde1; --text-accent: #66cc99; --text-primary: #ffffff; }

/* --- Global Reset and Body Styling --- */
html, body {
    margin: 0;
    padding: 0;
    height: 100%; /* Allow body to fill screen */
    width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto; /* Ensure vertical scroll is enabled */
}

body.modal-open {
    overflow: hidden; /* Only lock scroll when modal is open */
}

/* --- Layout Container --- */
.container {
    margin: 0 auto;
    padding: 20px 30px; 
    max-width: 1600px;
    min-height: 100vh; /* Ensure container fills height */
}

/* --- Main Content Grid --- */
.main-content-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr; 
}

@media (min-width: 900px) {
    .main-content-grid {
        grid-template-columns: 350px 1fr; 
        align-items: start; /* Critical: prevents sidebar from stretching page height */
    }
}

/* --- Profile/Links Section (Sticky Sidebar) --- */
.profile-summary {
    background: var(--bg-medium);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s;
    
    /* Sticky Sidebar Logic */
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px); /* Viewport height minus padding */
    overflow-y: auto; /* Internal scroll for sidebar */
    
    scrollbar-width: thin; 
    scrollbar-color: var(--text-accent) var(--bg-dark);
}

/* --- Dynamic Content Area (Right Column) --- */
.dynamic-content-area {
    /* Allow this area to grow as much as needed */
    height: auto;
    overflow: visible; 
    padding-bottom: 50px;
}

/* --- Typography & Links --- */
h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

a, a:visited { color: var(--text-accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--text-primary); text-decoration: none; }

/* --- Profile Elements --- */
.profile-summary h1 { text-align: center; font-size: 2.2rem; color: var(--text-accent); margin-top: 0; margin-bottom: 20px; }
.profile-photo { width: 100%; max-width: 250px; height: auto; display: block; margin: 0 auto 20px; border-radius: 50%; border: 3px solid var(--text-accent); box-shadow: 0 0 15px rgba(102, 252, 241, 0.5); }
.contact-links { padding-top: 20px; border-top: 1px solid var(--bg-dark); }
.link-item { display: block; font-size: 1.05rem; padding: 8px 0; border-bottom: 1px dashed var(--bg-dark); }
.link-item[href^="http"]:not([data-page])::after, .kid-links a[href^="http"]::after { content: "\2197"; font-size: 0.8em; padding-left: 5px; opacity: 0.6; }
.kid-links { list-style: none; padding: 0; margin-top: 10px; font-family: var(--font-code); }
.kid-links li { display: inline-block; margin-right: 15px; }
.family-heading { margin-top: 20px; font-size: 1.2rem; color: var(--text-light); }
.nav-link.active-nav { color: var(--text-primary); background-color: var(--bg-dark); border-radius: 4px; padding: 0 10px; border-left: 3px solid var(--text-accent); }

/* --- Components --- */
.posts-intro { font-family: var(--font-code); font-style: italic; color: var(--text-light); margin-top: -15px; }
.collapsible-content { transition: max-height 0.5s ease-in-out; }
.expand-button { display: block; margin: 10px auto 20px auto; padding: 10px 20px; background-color: var(--bg-medium); color: var(--text-accent); border: 1px solid var(--text-accent); border-radius: 4px; cursor: pointer; font-family: var(--font-code); }
.expand-button:hover { background-color: var(--text-accent); color: var(--bg-dark); }
.hidden-item { display: none; }

.content-loader { text-align: center; padding: 100px 0; color: var(--text-light); }
.spinner { border: 5px solid var(--bg-medium); border-top: 5px solid var(--text-accent); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto 15px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.error-message { color: var(--text-accent); font-family: var(--font-code); text-align: center; padding: 20px; }

.site-footer { text-align: center; padding: 20px 0; margin-top: 40px; border-top: 1px solid var(--bg-medium); font-size: 0.9rem; color: var(--text-light); opacity: 0.6; font-family: var(--font-code); }

/* Theme Switcher */
.theme-switcher { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
.theme-dot { width: 25px; height: 25px; border-radius: 50%; border: 2px solid var(--text-primary); cursor: pointer; opacity: 0.7; }
.theme-dot.active { border-color: var(--text-accent); box-shadow: 0 0 10px var(--text-accent); transform: scale(1.2); opacity: 1; }
.theme-dot[data-theme="theme-dark"] { background-color: #1f2833; }
.theme-dot[data-theme="theme-light"] { background-color: #007acc; }
.theme-dot[data-theme="theme-pastel"] { background-color: #e67e22; }
.theme-dot[data-theme="theme-cool"] { background-color: #66cc99; }

/* Scroll to Top */
.scroll-to-top { display: none; position: fixed; bottom: 20px; right: 30px; z-index: 100; background-color: var(--bg-medium); color: var(--text-accent); border: 1px solid var(--text-accent); border-radius: 50%; width: 40px; height: 40px; font-size: 1.5rem; font-weight: bold; line-height: 38px; text-align: center; cursor: pointer; }
.scroll-to-top:hover { opacity: 1; }
.scroll-to-top.show { display: block; }

/* --- SPECIFIC ABOUT ME STYLES --- */
.about-me-page .text-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Increased gap */
}

.about-me-page .text-cards .card-item {
    /* Bigger text */
    font-size: 1.25rem; 
    line-height: 1.8;
    
    /* Bigger boxes */
    padding: 35px;
    min-width: 45%; /* Force 2 per row on large screens, wrapping on smaller */
    flex-grow: 1;
    border-left-width: 6px; /* Thicker accent border */
}

/* Specific header styles for About page text */
.about-me-page h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-me-page h4 {
    font-size: 1.4rem;
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* Album Grid Adjustment for About Page */
#about-album-list .card-item {
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

#about-album-list .card-image {
    width: 100%;
    height: 280px; /* Taller images */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s;
}

#about-album-list .card-item:hover .card-image {
    transform: scale(1.02);
}

/* "Show More" button spacing specifically for About page */
.about-me-page .toggle-card-button {
    margin-top: 50px;
    margin-bottom: 80px;
    padding: 15px 40px;
    font-size: 1.2rem;
}
