/* General */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* Navigation */
.nav-bar {
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-bar a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.nav-bar a:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-bar h1 {
    margin: 0;
    font-size: 24px;
}

/* Header */
.thesis-header {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.thesis-header h1 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
}

.thesis-header .subtitle {
    color: #666;
    font-style: italic;
    margin: 0 0 15px 0;
}

.thesis-header .meta {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* Sections */
.thesis-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.thesis-section h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

/* Text + Image layout */
.content-with-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.content-with-image.reverse {
    grid-template-columns: 1fr 1fr;
}

.content-with-image.reverse .image {
    order: -1;
}

.content-with-image .text p {
    margin-top: 0;
}

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

.image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.image figcaption {
    font-size: 13px;
    color: #777;
    margin-top: 8px;
    font-style: italic;
}

.image.full-width img {
    width: 100%;
}

/* Image grid */
.image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 15px 0;
}

/* Document link */
.doc-link {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
}

.doc-link:hover {
    background: #45a049;
}

/* About section */
.about-section {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.about-section h3 {
    margin-top: 0;
    color: #333;
}

.about-section p {
    margin: 0;
    color: #555;
}

/* Text + Image layout with wrap */
.content-with-image {
    display: block;
    overflow: auto; /* clears the float so section height is correct */
}

.content-with-image .image {
    float: right;
    width: 45%;          /* adjust to taste: 40–50% works well */
    margin: 0 0 15px 20px; /* top, right, bottom, left */
}

.content-with-image.reverse .image {
    float: left;
    margin: 0 20px 15px 0; /* top, right, bottom, left */
}

.content-with-image .text {
    /* no width constraint — text fills remaining space around the float */
}

.content-with-image .text p {
    margin-top: 0;
}

@media (max-width: 700px) {
    .content-with-image .image,
    .content-with-image.reverse .image {
        float: none;
        width: 100%;
        margin: 15px 0;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .thesis-header h1 {
        font-size: 22px;
    }
}