/* ========== GLOBAL LAYOUT ========== */

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 40px;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

img {
    user-drag: none;
    -webkit-user-drag: none;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ========== HEADER ========== */

header {
    text-align: center;
    margin-bottom: 30px;
}

header img {
    width: 400px;
    border-radius: 10%;
}

/* ========== FOOTER ========== */

footer {
    text-align: center;
    font-size: 0.9em;
    color: rgba(0, 0, 0, 0.4);
}

footer a {
    color: rgba(0, 123, 255, 0.7);
    text-decoration: none;
    font-weight: 500;
}

/* ========== LINKS ========== */

a,
a:visited,
a:active {
    color: #007bff;
    text-decoration: none;
    font-weight: normal;
}

.links-container,
.other-links-wrapper {
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.links-container a,
.project-links a,
.inline-link,
.other-link {
    color: #007bff;
    text-decoration: none;
}

/* ========== ABOUT ME ========== */

.about-me {
    display: flex;
    align-items: center; 
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.about-me img {
    width: 260px;
    max-width: 100%;
    border-radius: 0; 
    box-shadow: none; 
    flex-shrink: 0;
}

.about-me .text {
    flex: 1;
    min-width: 280px;
    max-width: 640px;
}

.about-me .text h1 {
    font-size: 1.65em;
    font-weight: 600;
    margin-bottom: 14px;
}

.about-me .text p {
    font-size: 0.96em;
    line-height: 1.7;
    margin-bottom: 18px;
    color: #333;
}

.links-container {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
}

.links-container a {
    font-weight: 500;
    color: #007bff;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95em;
}

/* ========== PROJECTS ========== */

.projects {
    max-width: 1000px;
    margin: 0 auto 30px;
}

.projects-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 40px;
    font-size: 1.4em;
    font-weight: 600; /* Match Coursework and Other */
}

.project {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 20px;
    margin: 20px 40px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background-color: #fcfcfc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease-in-out;
    border-left: 4px solid #7bbdff;
}

.project:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-text {
    flex: 1;
    padding-right: 20px;
}

.project-text h3 {
    font-weight: 600;
    font-size: 1.15em;
    margin-bottom: 10px;
}

.project-text p {
    font-size: 0.95em;
    color: #222;
    margin-bottom: 8px;
}

.project img,
.project-gif {
    width: 280px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 20px;
}

/* ========== EVENTS ========== */

.events {
    max-width: 1000px;
    margin: 0 auto 30px;
    margin-left: 75px;
    padding-right: 40px;
}

.events-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-left: 40px;
    margin-bottom: 10px;
}

.events-intro {
    font-size: 0.95em;
    color: #444;
    margin-left: 40px;
    margin-bottom: 15px;
}

.event-list {
    list-style-type: none;
    padding: 0;
    margin: 0 40px;
}

.event-list li {
    background-color: #fcfcfc;
    border-left: 4px solid #7bbdff;
    padding: 20px 24px;
    margin-bottom: 20px;
    border-radius: 12px;
    font-size: 1em;
    line-height: 1.7;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease-in-out;
    min-height: 50px; 
}


.event-list li:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}


.event-list li strong {
    display: block;
    margin-bottom: 0;
}

/* ========== COURSEWORK ========== */

.coursework {
    max-width: 1000px;
    margin: 0 auto 30px;
}

.coursework-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 40px;
    font-size: 1.4em;
}

.coursework-icon {
    width: 40px;
    position: relative;
    top: -3px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px 40px;
    margin: 20px 40px;
}

.course {
    background-color: #fcfcfc;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease-in-out;
}

.course:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.course-text h3 {
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 6px;
}

.course-text p {
    font-size: 0.87em;
    color: #444;
    margin-bottom: 0;
}

.instructor {
    font-size: 0.82em;
    color: #777;
}

/* ========== OTHER SECTION ========== */

.other {
    max-width: 800px;
    margin: 0 auto 60px;
    padding: 0 40px;
    text-align: center;
}

.other-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 25px;
}

.other-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.other-image {
    width: 180px;
    height: auto;
    border-radius: 12px;
}

.other-image:hover {
    transform: scale(1.04);
}

.other-link {
    background-color: #f5faff;
    color: #007bff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
    transition: background 0.2s, transform 0.2s;
}

.other-link:hover {
    background-color: #e6f2ff;
    transform: translateY(-2px);
}

/* ========== MISC ========== */

.github-logo {
    width: 30px !important;
}

.space {
    width: 30px;
    display: inline-block;
}

.bracket {
    color: #000;
}

.contribution-image {
    display: block;
    margin: 20px auto;
    width: 30%;
    height: auto;
    aspect-ratio: 4 / 3;
}

/* ========== RESPONSIVE DESIGN ========== */

@media (max-width: 768px) {
    body {
        padding: 20px;
    }

    header img {
        width: 80%;
    }

    .about-me {
        flex-direction: column;
        text-align: center;
    }

    .about-me img {
        width: 70%;
    }

    .links-container,
    .other-links-wrapper {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .projects-title,
    .coursework-title,
    .events-title,
    .other-title {
        margin-left: 10px;
        font-size: 1.5em;
    }

    .project {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin: 20px;
        padding: 20px;
    }

    .project img,
    .project-gif {
        width: 90%;
        margin: 10px 0;
    }

    .events {
        margin-left: 0;
        padding-left: 0;
    }

    .event-list {
        margin: 0 20px;
    }

    .other-image {
        width: 140px;
    }
}
