/* Specific styles for thesis page */
body {
    padding-top: 80px;
    /* Space for fixed nav if needed, or just general spacing */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.thesis-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    flex: 1;
}

.navigation-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--primary-color);
}

.thesis-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    /* Assuming variable exists or using fallback */
    padding-bottom: 1rem;
}

/* Fallback for vars if they aren't global in styles.css yet */
:root {
    --primary-color: #7bed9f;
    --text-color: #e6f1ff;
    --bg-color: #0a192f;
    --card-bg: #112240;
}

.thesis-title {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

/* Responsive Row Layout */
.content-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.abstract-section {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* 7/10 width - 70% */
    flex: 7;
}

.notes-column {
    /* 3/10 width - 30% */
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-note, .application-note {
    background-color: rgba(100, 255, 218, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Specific styling if we want application note to look slightly different */
.application-note {
    background-color: rgba(64, 224, 208, 0.1); /* Slightly different teal tint perhaps? Or keep same? */
    /* Keeping same as language note for consistency unless asked otherwise */
    background-color: rgba(100, 255, 218, 0.1); 
}


.abstract-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Language Switcher Styles */
.language-switcher {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lang-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.lang-btn:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.lang-btn.active {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

.pdf-container {
    width: 100%;
    height: 800px;
    margin-bottom: 2rem;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.download-section {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--card-bg);
    border-radius: 8px;
}

/* Fix for horrible blue highlight on download link */
.cta-button, 
a.cta-button, 
a.cta-button:visited {
    color: var(--bg-color) !important;
    background-color: var(--primary-color);
    text-decoration: none;
    outline: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px; /* Ensure uniform look */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover, 
a.cta-button:hover {
    background-color: #4cdbb6; /* Slightly darker shade for hover */
    color: var(--bg-color) !important;
    text-decoration: none;
    transform: translateY(-2px);
}

.cta-button:focus, 
a.cta-button:focus {
    outline: 2px solid var(--text-color); /* Accessible focus ring instead of default blue */
    outline-offset: 2px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark backdrop */
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #1a1a1a;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transform-origin: center center;
    transition: background-color 0.3s, transform 0.3s, color 0.3s;
    z-index: 10;
}

.modal-close:hover {
    background-color: rgba(123, 237, 159, 0.1);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.modal-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.modal-spacer {
    height: 20px;
    width: 100%;
    flex-shrink: 0;
}

.download-options {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.download-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    width: 45%;
    min-width: 200px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.download-card:hover {
    background-color: rgba(100, 255, 218, 0.1);
    transform: translateY(-5px);
}

.download-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.download-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: #ccc;
}

@media (max-width: 768px) {
    .content-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .notes-column {
        width: 100%;
        flex: auto;
    }

    .language-note,
    .application-note,
    .abstract-section {
        flex: auto;
        width: 100%;
    }

    .pdf-container {
        display: none;
        /* Hide iframe on mobile if needed, or keep it but allow download */
    }

    .mobile-pdf-notice {
        display: block;
        text-align: center;
        margin: 2rem 0;
        padding: 1rem;
        background-color: var(--card-bg);
        border-radius: 8px;
    }

    .download-options {
        flex-direction: column;
        align-items: center;
    }
    
    .download-card {
        width: 100%;
    }
}
