* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    /* text-align: justify; */
}

header {
    background: #004d00;
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    position: relative;
}

.logo {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 100px; /* Adjust width as needed */
    height: auto; /* Maintain aspect ratio */
}

.logo-link {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    display: block;
}

nav ul {
    padding: 0;
    list-style: none;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav a {
    color: #ffffff;
    text-decoration: none;
}

main {
    padding: 20px 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 20px;
}

h2 {
    color: #004d00;
}

footer {
    background: #f1f1f1;
    text-align: center;
    padding: 10px 0;
}

/* Blog page layout: center column and full-width images */
#blog {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

#blog img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0.5rem 0;
}

/* figure and caption styling for blog images */
.blog-figure {
    margin: 0;
    text-align: left;
}

.blog-figure img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
}

.blog-figure figcaption {
    font-size: 0.9rem;
    color: #000;
    margin-top: 0.25rem;
    margin-bottom: 2rem;
    font-weight: 700;
    font-style: italic;
}

/* larger blog headings */
#blog h2 {
    font-size: 2rem;
}

/* separator between consecutive articles */
#blog article + article {
    border-top: 1px solid #ccc;
    padding-top: 2rem;
    margin-top: 2rem;
}

#blog h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

/* Project thumbnail layout */
.project {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 16px 0;
}

.project-thumb {
    width: 240px;
    height: 240px;
    object-fit: cover;
    flex: 0 0 240px;
    border-radius: 6px;
}

.project-content {
    flex: 1;
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table caption {
    font-weight: bold;
    font-style: italic;
    margin-bottom: 12px;
    text-align: left;
    caption-side: top;
}

table th {
    background-color: #004d00;
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
}

table th:nth-child(2),
table td:nth-child(2) {
    text-align: center;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: #f5f5f5;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

@media (max-width: 600px) {
    /* project thumbnails stack vertically */
    .project {
        flex-direction: column;
        align-items: flex-start;
    }
    .project-thumb {
        width: 180px;
        height: 180px;
        margin-bottom: 8px;
    }
    
    /* smaller tables */
    table {
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 8px 12px;
    }

    /* mobile logo repositioning */
    .logo,
    .logo-link {
        position: static;
        width: 80px;
        margin: 0 auto 1rem;
        display: block;
    }

    /* stack header elements and place logo first */
    header {
        text-align: center;
        padding-top: 20px; /* spacing above for logo */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .logo-link {
        order: -1;
    }
}

