/* Center-align all section titles and add bottom padding */
h1, h2, h3, h4 {
    text-align: center;
    padding-bottom: 1rem;
}

h3, h4 {
    text-align: left;
    padding-bottom: 0.75rem;
}

/* Glassmorphism for blog post cards */
#blog-post-list .placeholder-post {
    background: rgba(255,255,255,0.18);
    border-radius: 1.5rem;
    box-shadow: 0 4px 16px rgba(31,38,135,0.15), inset 0 2px 10px rgba(255,255,255,0.18);
    backdrop-filter: blur(1.5px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.5);
    margin-bottom: 1em;
    padding: 1em;
}

#blog-post-list .placeholder-title,
#blog-post-list .placeholder-line {
    background: rgba(255,255,255,0.25);
    border-radius: 0.5em;
}

#blog-post-list .placeholder-title {
    height: 1.2em;
    margin-bottom: 0.5em;
}

#blog-post-list .placeholder-line {
    height: 0.8em;
    margin-bottom: 0.3em;
}

#blog-post-list .placeholder-line.short {
    width: 60%;
}

/* Extra spacing for about text */
.about-me p {
    margin-bottom: 1em;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(164, 95, 255, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container.one-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 36rem;
    width: 100%;
    margin: 0 auto;
}

.glass {
    /* glassmorphism effect from glass-style.css will apply */
}
/* base */
*,
*:before,
*:after {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -ms-box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial,
        sans-serif;
    font-size: 14px;
    margin-top: 2.5rem;
    margin-bottom: 10rem;
}

a,
a:focus,
a:hover {
    text-decoration: none;
}

p {
    letter-spacing: 0.02em;
    line-height: 1.5;
}

/* Light mode & default */

body {
    color: #333;
    background-color: #fff;
}

a {
    color: rgba(54, 122, 249);
    text-decoration: none;
}

a:focus,
a:hover {
    color: #24c1ff;
    text-decoration: underline;
}

main {
    background-color: #fff;
}

.placeholder-title {
    background-color: #24c1ff;
}

.placeholder-line {
    background-color: #dedede;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

main {
    width: 100%;
    max-width: 600px;
    padding: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-top: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

main>section {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

main>section>h2 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-align: center;
    margin-top: 2rem;
}

.header-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-bottom: 1rem;
}

.header-image>img {
    width: 40%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.5);
}

body>h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

small {
    font-size: 1rem;
}

.social-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 0.75rem;
    margin-bottom: 0.75rem;
}

.social-links>a>img {
    height: 3rem;
    margin: 0.5rem;
}

.social-links>a:hover {
    transform: scale(1.1);
}

.about-me>p {
    font-size: 1rem;
    text-align: center;
}

.blog-posts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#blog-post-list {
    max-width: 100%;
    width: 100%;
}

#show-more-link {
    /* make it look like a link */
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #24c1ff;
    border-radius: 0.25rem;
    color: #24c1ff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

#show-more-link:hover {
    background-color: #24c1ff;
    color: #fff;
}

.post {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

/* CSS loader */

.placeholder-post {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.placeholder-post::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
    animation: shine 1.5s infinite;
}

.placeholder-title,
.placeholder-line {
    height: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
}

.placeholder-title {
    width: 60%;
    height: 1.5rem;
    margin: 0.5rem 0;
}

.placeholder-line {
    width: 100%;
}

.placeholder-line.short {
    width: 80%;
}

/* Shine animation */
@keyframes shine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.projects>ul {
    /* hide list dots */
    list-style: none;
    padding: 0;
    margin: 0;
}

.projects>ul>li {
    /* add border */
    border-bottom: 1px solid #727272;
    padding: 0.5rem;
    margin: 0.5rem 0;
    
}

.project-logo {
    max-width: 128px;
}

.project-image {
    max-width: 320px;
    max-height: 320px;
}

section.sponsors {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

section.sponsors > iframe {
    height: 225px;
    border: 0;
    width: 98%;
    /* rounded corners */
    border-radius: 0.5rem;
}

footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

footer p {
    margin: 0.2rem;
}

/* Dark mode */

@media (prefers-color-scheme: dark) {
    body {
        color: #eee;
        background-color: #121212;
    }

    a {
        color: #24c1ff;
        text-decoration: none;
    }

    a:focus,
    a:hover {
        color: #24c1ff;
        text-decoration: underline;
    }

    main {
        background-color: #212121;
    }

    .placeholder-post::after {
        background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(182, 182, 182, 0.5) 50%, rgba(255, 255, 255, 0) 100%);
    }

    .placeholder-title {
        background-color: #24c1ff;
    }
    
    .placeholder-line {
        background-color: #eee;
    }

    .post {
        background: rgba(0, 0, 0, 0.2);
    }

    /* override GitHub badge to improve contrast */
    .social-links > a[title="GitHub"] > img[alt="GitHub"] {
        filter: invert(1) hue-rotate(180deg) brightness(2) contrast(0.8);
    }
}
