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

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Libertinus Serif', 'Linux Libertine', 'Liberation Serif', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.5;
    color: #000;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.main-wrapper {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
    height: 90vh;
    align-items: center;
    justify-content: center;
}

.left-column {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

nav {
    margin-bottom: 0;
    text-align: center;
}

.image-container {
    flex-shrink: 0;
}

.image-container img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

.name-section {
    text-align: center;
}

.name-section h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.social-links {
    font-size: 14px;
    margin-top: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.social-links a {
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.social-links a:hover {
    opacity: 0.7;
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    max-height: 90vh;
    align-self: center;
}

h1 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #000;
    text-align: center;
}


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

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

nav a {
    color: #000;
    text-decoration: none;
    cursor: pointer;
    font-size: 18px;
}

nav a:hover {
    text-decoration: underline;
}

nav a.active {
    font-weight: bold;
    text-decoration: underline;
}

h2 {
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #000;
    text-align: center;
}

p {
    margin: 8px 0;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

li {
    margin: 6px 0;
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
}

a {
    color: #000;
    text-decoration: underline;
}

.content-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 10px 80px 10px;
    text-align: left;
    min-height: 0;
    max-height: calc(90vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 0;
    position: relative;
}

.main-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.footnotes {
    position: absolute;
    bottom: 0;
    left: 10px;
    right: 10px;
    padding-top: 20px;
}

.coursework-item {
    margin: 12px 0;
    text-align: left;
}

.course-code {
    font-weight: bold;
    font-size: 15px;
    text-align: left;
}

.course-title {
    font-size: 15px;
    margin: 3px 0;
    text-align: left;
}

.course-description {
    font-size: 14px;
    margin: 5px 0;
    color: #333;
    text-align: left;
}

.reading-item {
    margin: 10px 0;
    text-align: left;
}

.reading-title {
    font-weight: bold;
    font-size: 15px;
    text-align: left;
}

.reading-author {
    font-size: 14px;
    margin: 3px 0;
    color: #333;
    text-align: left;
}

.reading-meta {
    font-size: 14px;
    margin: 3px 0;
    color: #666;
    text-align: left;
}

/* Scrollbar styling */
.content-area::-webkit-scrollbar {
    width: 8px;
}

.content-area::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.content-area::-webkit-scrollbar-thumb {
    background: #888;
}

.content-area::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width: 768px) {
    html, body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }

    body {
        padding: 15px 10px;
        align-items: flex-start;
    }

    .main-wrapper {
        flex-direction: column;
        gap: 0;
        height: auto;
        min-height: auto;
        align-items: center;
        padding-bottom: 20px;
    }

    .left-column {
        order: 1;
        width: 100%;
        gap: 15px;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .name-section {
        margin-bottom: 5px;
    }

    .social-links {
        margin-bottom: 0;
        margin-top: 5px;
        display: flex;
        gap: 20px;
        align-items: center;
        justify-content: center;
    }

    .social-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
        touch-action: manipulation;
    }

    .social-links svg {
        width: 24px;
        height: 24px;
    }

    .container {
        order: 2;
        width: 100%;
        max-height: none;
        margin-top: 0;
        padding-top: 0;
    }

    h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    h2 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    nav li {
        margin: 0 8px;
    }

    nav a {
        font-size: 14px;
    }

    .image-container {
        text-align: center;
    }

    .image-container img {
        max-width: 200px;
        margin: 0 auto;
        border-radius: 15px;
    }

    .content-area {
        max-height: none;
        overflow-y: visible;
        padding: 0 5px;
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
        justify-content: flex-start;
    }

    .main-content {
        align-self: flex-start;
    }

    .footnotes {
        position: static;
        margin-top: 20px;
        padding-top: 20px;
        left: auto;
        right: auto;
    }

    p {
        font-size: 15px;
    }

    .course-code,
    .course-title,
    .reading-title {
        font-size: 14px;
    }

    .course-description,
    .reading-author,
    .reading-meta {
        font-size: 13px;
    }
}
