/* ==========================================================================
   layout.css — App layout: header, nav, main content area
   Used by pages with navigation (Vault, Timelog, future sub-sites)
   ========================================================================== */

/* --- Header / nav --- */
.site-header {
    position: sticky; top: 0; z-index: 10;
    padding: 1.2em 2em;
    border-bottom: 1px solid var(--border-mid);
    background: var(--bg);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.5em;
}

.site-logo {
    font-size: 1.1rem; font-weight: 600;
    text-decoration: none !important;
}
.site-logo-home {
    color: var(--text-muted); text-decoration: none !important;
    transition: color 0.2s;
}
.site-logo-home:hover { color: var(--text-bright); }
.site-logo-app {
    color: var(--text-bright); text-decoration: none !important;
    text-shadow: 0 0 15px rgba(232,148,60,0.3);
    transition: color 0.2s;
}
.site-logo-app:hover { color: var(--text-glow); }

.site-nav { display: flex; gap: 0.6em 1.2em; align-items: center; flex-wrap: wrap; }
.site-nav a {
    color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
    transition: color 0.2s; white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active { color: var(--text-bright); }
.site-nav .sep { color: var(--text-faint); }
.site-nav .user-email { font-size: 0.85rem; color: var(--info); }

/* --- Main content area --- */
.site-main {
    position: relative;
    max-width: 1200px; width: 100%;
    margin: 0; padding: 2em;
}

/* --- Profile dropdown --- */
.profile-dropdown {
    position: relative;
    display: inline-block;
}
.profile-toggle {
    cursor: pointer;
    user-select: none;
}
.profile-toggle:hover {
    color: var(--text-bright);
}
.profile-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5em);
    right: 0;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 4px;
    min-width: 160px;
    z-index: 20;
    padding: 0.3em 0;
}
.profile-menu.open {
    display: block;
}
.profile-menu a {
    display: block;
    padding: 0.5em 1em;
    color: var(--text);
    font-size: 0.8rem;
    text-decoration: none;
}
.profile-menu a:hover {
    color: var(--text-bright);
    background: rgba(200,120,48,0.06);
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 2em 1em 1.5em;
    font-size: 0.7rem;
}
.site-footer a {
    color: var(--text-muted);
    margin: 0 0.5em;
}
.site-footer a:hover {
    color: var(--text-bright);
}
.site-footer .footer-sep {
    color: var(--text-faint);
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .site-header {
        padding: 0.8em 1em;
    }
    .site-nav { gap: 0.3em 0.6em; }
    .site-nav .sep { display: none; }
    .site-nav a { font-size: 0.75rem; }
    .site-nav .user-email { font-size: 0.75rem; }
    .site-main { padding: 1.5em 1em; }
    .theme-toggle { order: 999; }
}
