/*
 * StockUI - TalentBlender Rules
 * ==============================
 *
 * LAYERED DESIGN (Lego approach):
 *   Layer 1: Palette grid (always visible, background)
 *   Layer 2: Blue theme (semi-transparent containers)
 *   Layer 3: Content (text, forms, cards)
 *
 * THEME:
 *   mode: dark
 *   background: palette-grid
 *   overlay: rgba(8, 1, 48, 0.92)
 *   foreground: #edeae1
 *   primary: #2463d1
 *   accent: #f08dd2
 *
 * LAYOUT:
 *   max-width: 1200px
 *   alignment: left
 *   padding: 40px
 */

/* ==================== RESET & BASE ==================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Patua One', cursive;
    font-size: 1.25rem;
    color: #edeae1;
    line-height: 1.5;
    min-height: 100vh;
    background-color: #030014;
    overflow-x: hidden;
}

a {
    color: #edeae1;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #f08dd2;
}

/* ==================== LAYER 1: PALETTE BACKGROUND ==================== */

.palette-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-wrap: wrap;
    z-index: 0;
    pointer-events: none;
}

.palette-tile {
    width: 100px;
    height: 60px;
    flex-shrink: 0;
}

/* ==================== LAYER 2 & 3: PAGE FRAME ==================== */

.page-frame {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==================== HEADER ==================== */

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(180deg, rgba(75, 85, 130, 0.95) 0%, rgba(45, 55, 100, 0.95) 100%);
    backdrop-filter: blur(8px);
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #edeae1;
    margin-right: auto;
}

.logo:hover {
    color: #f08dd2;
}

.main-nav,
.secondary-nav {
    display: flex;
    gap: 1.5rem;
}

.main-nav a,
.secondary-nav a {
    font-size: 1.1rem;
    padding: 0.5rem 0;
}

/* Subtle header variant (for immersive pages like gallery) */
.site-header.header-subtle {
    background: rgba(20, 30, 50, 0.4);
}

.site-header.header-subtle .logo,
.site-header.header-subtle .main-nav a,
.site-header.header-subtle .secondary-nav a {
    color: rgba(237, 234, 225, 0.7);
}

.site-header.header-subtle .logo:hover,
.site-header.header-subtle .main-nav a:hover,
.site-header.header-subtle .secondary-nav a:hover {
    color: #f08dd2;
}

/* ==================== CONTENT ==================== */

.content {
    flex: 1;
    padding: 2.5rem;
    max-width: 1200px;
    width: 100%;
}

/* Blue overlay on content (default) */
.content-overlay {
    background-color: rgba(8, 1, 48, 0.92);
    backdrop-filter: blur(4px);
    margin: 1rem 2rem;
    border-radius: 8px;
}

/* Transparent content (shows palette through) */
.content-transparent {
    background-color: transparent;
}

/* Flash messages */
.flash-messages {
    list-style: none;
    margin-bottom: 1.5rem;
}

.flash-message {
    color: #f08dd2;
    font-style: italic;
    padding: 0.5rem 0;
}

/* ==================== FOOTER ==================== */

.site-footer {
    margin-top: auto;
    padding: 2.5rem 2.5rem 3rem;
    background-color: rgba(8, 1, 48, 0.85);
    backdrop-filter: blur(8px);
    min-height: 120px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    max-width: 1200px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section-title {
    color: #edeae1;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-links a {
    color: #888;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: #f08dd2;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.85rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== FORMS (StockUI Component) ==================== */

.form-box {
    background-color: rgba(21, 21, 36, 0.95);
    padding: 2rem;
    max-width: 500px;
    border-radius: 8px;
}

.form-title {
    color: #edeae1;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    color: #aaa;
    margin-bottom: 0.25rem;
}

.form-entry-text {
    width: 100%;
    padding: 0.75rem;
    font-family: 'Patua One', cursive;
    font-size: 1rem;
    color: #edeae1;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    outline: none;
    transition: border-color 0.2s ease;
}

.form-entry-text:focus {
    border-color: #f08dd2;
}

.form-entry-text::placeholder {
    color: #666;
}

textarea.form-entry-text {
    resize: vertical;
    min-height: 100px;
}

.button {
    padding: 1rem 2rem;
    font-family: 'Patua One', cursive;
    font-size: 1rem;
    color: #edeae1;
    background-color: #2463d1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.button:hover {
    background-color: #4d41d7;
}

.button:active {
    transform: scale(0.98);
}

/* ==================== CARDS (StockUI Component) ==================== */

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* ==================== SKILL TAGS ==================== */

.skill-tag {
    display: inline-block;
    background: #2463d1;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    margin: 0.25rem;
    font-size: 0.9rem;
}

/* ==================== GALLERY / PALETTE GRID ==================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.job-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.job-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 100px;
    padding: 1rem;
    color: white;
    text-align: center;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.job-tile:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    z-index: 10;
    color: white;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .site-header {
        padding: 1rem 1.5rem;
    }

    .content {
        padding: 1.5rem;
    }

    .content-overlay {
        margin: 0.5rem 1rem;
    }

    .palette-tile {
        width: 80px;
        height: 50px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .logo {
        margin-right: 0;
        margin-bottom: 0.5rem;
        font-size: 2rem;
    }

    .main-nav,
    .secondary-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .main-nav a,
    .secondary-nav a {
        font-size: 1rem;
    }

    .content {
        padding: 1rem;
    }

    .content-overlay {
        margin: 0.5rem;
        padding: 1.5rem;
    }

    .form-box {
        padding: 1.5rem;
    }

    .palette-tile {
        width: 60px;
        height: 40px;
    }

    .job-tile {
        width: 50%;
        height: 80px;
        font-size: 0.8rem;
    }

    .site-footer {
        padding: 1.5rem 1rem 2rem;
        min-height: 100px;
    }

    .footer-content {
        gap: 1rem;
    }

    .footer-section {
        min-width: 80px;
    }
}

/* ==================== UTILITIES ==================== */

.text-muted {
    color: #888;
}

.text-accent {
    color: #f08dd2;
}

.text-primary {
    color: #2463d1;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
