/* Handwriting font for Signature */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: #fcfaf8;
    /* Stone-50 */
    color: #292524;
    /* Stone-800 */
}

.signature-font {
    font-family: 'Dancing Script', cursive;
}

h1,
h2,
h3,
h4,
.serif-font {
    font-family: 'Noto Serif', serif;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    height: 350px;
    max-height: 400px;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.active-tab {
    border-bottom: 3px solid #d97706;
    /* Amber-600 */
    color: #d97706;
    font-weight: 600;
}

.inactive-tab {
    color: #78716c;
    /* Stone-500 */
    border-bottom: 3px solid transparent;
}

.inactive-tab:hover {
    color: #44403c;
    /* Stone-700 */
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* ========================================
   ACADEMIC STYLES FOR DAN-NHAP PAGE
   ======================================== */

/* Academic Typography */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;1,400&display=swap');

.academic-heading {
    font-family: 'Merriweather', 'Noto Serif', serif;
    font-weight: 700;
    color: #44403c;
    letter-spacing: -0.02em;
}

.academic-body {
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: #44403c;
}

.academic-section-number {
    color: #b45309;
    font-weight: 600;
    margin-right: 0.5rem;
}

/* Sidebar Table of Contents */
.toc-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 1rem;
    border-right: 2px solid #e7e5e4;
}

.toc-sidebar::-webkit-scrollbar {
    width: 4px;
}

.toc-sidebar::-webkit-scrollbar-thumb {
    background-color: #d6d3d1;
    border-radius: 2px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f5f5f4;
}

.toc-link {
    color: #57534e;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: block;
}

.toc-link:hover {
    color: #b45309;
    padding-left: 0.5rem;
}

.toc-link.active {
    color: #b45309;
    font-weight: 600;
    border-left: 3px solid #b45309;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.toc-subitem {
    padding-left: 1rem;
    font-size: 0.8rem;
}

/* Academic Tables */
.academic-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.academic-table caption {
    padding: 0.75rem;
    font-weight: 600;
    color: #57534e;
    font-size: 0.85rem;
    text-align: left;
    background-color: #fafaf9;
    border-bottom: 1px solid #e7e5e4;
}

.academic-table thead {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    color: white;
}

.academic-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.academic-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e7e5e4;
    color: #44403c;
}

.academic-table tbody tr:nth-child(even) {
    background-color: #fafaf9;
}

.academic-table tbody tr:hover {
    background-color: #fef3c7;
}

.academic-table .highlight-cell {
    background-color: #fef3c7;
    font-weight: 600;
}

/* Citations & References */
.citation {
    color: #b45309;
    font-weight: 600;
    font-size: 0.75rem;
    vertical-align: super;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.citation:hover {
    color: #92400e;
    text-decoration: underline;
}

.references-section {
    background-color: #fafaf9;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 3rem;
}

.references-section h3 {
    font-family: 'Merriweather', serif;
    color: #44403c;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #b45309;
}

.reference-item {
    padding: 0.5rem 0;
    padding-left: 2rem;
    text-indent: -2rem;
    font-size: 0.85rem;
    color: #57534e;
    line-height: 1.6;
}

.reference-item a {
    color: #b45309;
    word-break: break-all;
}

/* Academic Blockquotes */
.academic-quote {
    border-left: 4px solid #b45309;
    background: linear-gradient(90deg, #fef3c7 0%, #fffbeb 100%);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #44403c;
    border-radius: 0 0.5rem 0.5rem 0;
}

.academic-quote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #78716c;
    font-style: normal;
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(180, 83, 9, 0.15);
}

.stat-number {
    font-family: 'Merriweather', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #b45309;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #78716c;
    margin-top: 0.25rem;
}

/* Info Box */
.info-box {
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0ea5e9;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
}

.info-box.warning {
    background-color: #fefce8;
    border-color: #fde047;
    border-left-color: #eab308;
}

.info-box.note {
    background-color: #faf5ff;
    border-color: #e9d5ff;
    border-left-color: #a855f7;
}

/* Responsive adjustments for TOC */
@media (max-width: 1024px) {
    .toc-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        border-right: none;
        border-bottom: 2px solid #e7e5e4;
        padding-bottom: 1rem;
        margin-bottom: 2rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }

    #summary-panel,
    #summary-panel * {
        visibility: visible;
    }

    #summary-panel {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }

    /* Hide the print button itself */
    #summary-panel button {
        display: none;
    }

    nav,
    footer {
        display: none !important;
    }
}