/* PhD Presentation Styles */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --nav-height: 60px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, var(--bg-color) 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding-top: var(--nav-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.header .author {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.header .university {
    font-size: 1rem;
    opacity: 0.7;
    font-weight: 400;
}

/* Modern Professional Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo::before {
    content: "📚";
    font-size: 1.5rem;
}

.nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav li {
    position: relative;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: block;
    position: relative;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.nav a.active {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.15);
    font-weight: 600;
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: var(--card-bg);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #6b7280;
}

.breadcrumb .current {
    color: var(--text-color);
    font-weight: 600;
}

/* Content Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.card h3 {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
}

.card h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem 0;
}

/* Images */
.image-container {
    text-align: center;
    margin: 2rem 0;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.image-caption {
    font-style: italic;
    color: #6b7280;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Lists */
ul, ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

li {
    margin: 0.5rem 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
}

tr:hover {
    background: #f9fafb;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    cursor: help;
    border-bottom: 2px dotted var(--secondary-color);
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
    font-weight: normal;
    line-height: 1.4;
    box-shadow: var(--shadow-lg);
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header h2 {
        font-size: 1.2rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav li {
        width: 100%;
        margin: 0;
    }
    
    .nav a {
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 1rem;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .tooltip .tooltiptext {
        width: 250px;
        margin-left: -125px;
    }
    
    .chapter-nav {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: calc(var(--nav-height) + 10px);
    }
    
    .header {
        padding: 1.5rem 0;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header h2 {
        font-size: 1.1rem;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
    
    .card h3 {
        font-size: 1.2rem;
    }
}

/* Special Elements */
.highlight {
    background: linear-gradient(120deg, rgba(251, 191, 36, 0.3) 0%, rgba(251, 191, 36, 0.1) 100%);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
}

.quote {
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: #fef3c7;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.equation {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
    font-family: 'Times New Roman', serif;
    font-size: 1.1rem;
    border-left: 4px solid var(--secondary-color);
}

/* Professional highlight boxes */
.highlight-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.1);
}

.highlight-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.highlight-box h4 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
}

/* Academic table styling */
table.academic {
    font-size: 0.95rem;
    border: 1px solid #e5e7eb;
}

table.academic th {
    background: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

table.academic td {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
}

table.academic tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Section dividers */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    margin: 3rem 0;
    border-radius: 1px;
}

/* Chapter Navigation */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.chapter-nav a {
    text-decoration: none;
}

/* Print styles for thesis defense */
@media print {
    .nav, .back-to-top, .progress-container {
        display: none !important;
    }
    
    body {
        padding-top: 0;
        background: white;
        color: black;
    }
    
    .header {
        background: white;
        color: black;
        border-bottom: 2px solid black;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        margin-bottom: 1rem;
    }
    
    .image-container img {
        max-width: 100%;
        height: auto;
    }
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Enhanced Mathematical Equation Styling */
.equation-container {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    border-left: 6px solid var(--secondary-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.equation-container:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.equation-container::before {
    content: "🔢";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--card-bg);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.equation-caption {
    font-style: italic;
    color: #64748b;
    margin-top: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
}

/* MathJax equation styling */
.MathJax {
    font-size: 1.2rem !important;
}

.MathJax_Display {
    margin: 1rem 0 !important;
}

mjx-container[jax="CHTML"][display="true"] {
    margin: 1.5rem 0 !important;
}

mjx-container[jax="CHTML"] {
    color: var(--text-color) !important;
}

/* Interactive equation elements */
.equation-interactive {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.equation-interactive:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

.equation-interactive::after {
    content: "Click to interact";
    position: absolute;
    bottom: -8px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.equation-interactive:hover::after {
    opacity: 1;
}

/* Inline mathematical expressions */
.math-inline {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Times New Roman', serif;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 1.05em;
}

/* Mathematical variable highlighting */
.math-var {
    color: #dc2626;
    font-weight: 600;
    font-style: italic;
}

.math-operator {
    color: #059669;
    font-weight: 700;
}

.math-function {
    color: #7c3aed;
    font-weight: 600;
}

/* Legacy equation styling for backward compatibility */
.equation {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #d1d5db;
    border-left: 6px solid var(--secondary-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
    text-align: center;
    font-family: 'Times New Roman', serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
    position: relative;
}

.equation:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

/* Equation explanation boxes */
.equation-explanation {
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #475569;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.equation-explanation strong {
    color: var(--primary-color);
}

/* Mathematical symbols and notation */
.math-symbol {
    font-family: 'Times New Roman', serif;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Equation numbering */
.equation-number {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Mathematical proof and derivation boxes */
.proof-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #22c55e;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.proof-box h4 {
    color: #15803d;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.proof-step {
    margin: 0.8rem 0;
    padding-left: 1rem;
    border-left: 3px solid #22c55e;
}

/* Theorem and definition boxes */
.theorem-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.theorem-box::before {
    content: "Theorem";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #f59e0b;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.definition-box {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border: 2px solid #8b5cf6;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
}

.definition-box::before {
    content: "Definition";
    position: absolute;
    top: -12px;
    left: 20px;
    background: #8b5cf6;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}