/* =====================================================
 * layout.css
 * Main body, glass card, grid, columns, and headings.
 * Depends on: base.css color variables.
 * ===================================================== */

/* =====================================================
 * BODY
 * ===================================================== */
.app-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

@media (min-width: 640px) {
    .app-body { padding: 1.5rem; }
}

@media (min-width: 768px) {
    .app-body { padding: 2.5rem; }
}

/* =====================================================
 * GLASS CARD (main container)
 * ===================================================== */
.glass-card {
    width: 100%;
    max-width: 72rem;
    border-radius: 1.5rem;
    overflow: hidden;
    margin: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 10;

    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(26px);
    -webkit-backdrop-filter: blur(26px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #1f2937;
}

.dark .glass-card {
    background: rgba(12, 10, 20, 0.65);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 120, 80, 0.2);
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.85),
                inset 0 0 60px rgba(249, 115, 22, 0.06);
    color: #eceeed;
}

/* =====================================================
 * MAIN GRID (two columns)
 * ===================================================== */
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 580px;
}

@media (min-width: 768px) {
    .app-grid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .col-left  { grid-column: span 5 / span 5; }
    .col-right { grid-column: span 7 / span 7; }
}

/* =====================================================
 * RIGHT COLUMN (tabs and content)
 * ===================================================== */
.panel-right {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    max-height: none;
}

@media (min-width: 640px) {
    .panel-right { padding: 2rem; }
}

@media (min-width: 768px) {
    .panel-right { padding: 2.5rem; }
}

/* =====================================================
 * TAB HEADINGS
 * ===================================================== */
.tab-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #18181b;
    margin-bottom: 0.5rem;
}

.dark .tab-title { color: #ffffff; }

.tab-title--spacious {
    margin-bottom: 1rem;
}

.tab-subtitle {
    font-size: 0.75rem;
    color: #52525b;
    margin-bottom: 0.5rem;
}

.dark .tab-subtitle { color: #a1a1aa; }

/* =====================================================
 * TAB PANELS (content)
 * ===================================================== */
.tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tab-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab-body--exp { gap: 1rem; }
.tab-body--edu { gap: 1rem; }

/* =====================================================
 * SCROLLBAR
 * ===================================================== */
.custom-scroll::-webkit-scrollbar { width: 4px; }
.custom-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.3);
    border-radius: 4px;
}

/* =====================================================
 * MOBILE TWEAKS
 * ===================================================== */
@media (max-width: 767px) {
    /* Stack the grid instead of keeping two columns. */
    .app-grid {
        display: flex;
        flex-direction: column;
        min-height: auto;
    }

    /* Let the right column use the full width while retaining its padding. */
    .panel-right {
        max-height: none;
        overflow-y: visible;
        width: 100%;
        padding: 1.25rem;
    }

    .tab-title {
        font-size: 1.1rem;
        margin-bottom: 0.375rem;
    }

    .tab-panel {
        scroll-margin-top: 4.5rem;
    }

    .app-nav {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }
    .app-nav::-webkit-scrollbar { display: none; }

    .app-nav-tab {
        font-size: 0.75rem;
    }
}