/* ==== Reset & Base ==== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(120deg, #dde6fa 0%, #c3e5f7 100%);
    color: #202a44;
    min-height: 100vh;
}

/* ==== Header ==== */
header {
    background: rgba(51, 84, 160, 0.96);
    box-shadow: 0 2px 10px #3354a026;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 36px;
    padding: 25px 0;
    border-radius: 0 0 18px 18px;
    position: sticky;
    top: 0;
    z-index: 100;
}
header a {
    color: #fff;
    font-size: 1.18em;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 7px;
    transition: background .18s, color .18s, box-shadow .18s;
}
header a:hover, header a:focus {
    background: #8ac8f6;
    color: #28407b;
    box-shadow: 0 2px 11px #8ac8f633;
    outline: none;
}

/* ==== Centered Page Title ==== */
.center {
    text-align: center;
    margin-bottom: 18px;
}
.page-title {
    font-size: 2.2em;
    color: #417aec;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.text {
    font-family: inherit;
    font-size: 1em;
    color: #355186;
}

.center {
    background: rgba(255,255,255,0.96);
    box-shadow: 0 6px 28px #417aec18;
    border-radius: 24px;
    max-width: 600px;
    margin: 44px auto 24px auto;
    padding: 40px 32px 34px 32px;
    text-align: center;
    position: relative;
    z-index: 2;
    transition: box-shadow 0.18s;
}

.center:hover {
    box-shadow: 0 16px 40px #417aec33;
}

/* Gorgeous gradient, big, bold, centered, matching previous colors */
.center .page-title {
    font-size: 2.8em;
    font-weight: 800;
    letter-spacing: 1.7px;
    margin-bottom: 16px;
    line-height: 1.18;
    /* Michigan blues gradient! */
    background: linear-gradient(100deg,#417aec 10%, #5ccdff 65%, #dde6fa 105%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    /* Soft shadow for pop */
    text-shadow: 0 4px 16px #5ccdff18;
}

.center .text {
    font-size: 1.19em;
    color: #355186;
    font-weight: 500;
    letter-spacing: 0.7px;
    margin-bottom: 0;
    margin-top: 0;
}

/* Responsive for mobile screens */
@media (max-width: 700px) {
    .center {
        padding: 18px 6vw;
        max-width: 98vw;
    }
    .center .page-title {
        font-size: 2em;
        margin-bottom: 10px;
    }
    .center .text {
        font-size: 1em;
    }
}

.text, .center .text {
    display: block;
    font-size: 1.08em;
    color: #355186;
    line-height: 1.6;
    font-family: inherit;
    margin: 0 0 16px 0;
}

/* Inline links by default */
a {
    display: inline;
    color: #417aec;
    font-weight: 500;
    text-decoration: underline;
    transition: color 0.18s, text-shadow 0.18s;
    background: transparent;
    box-shadow: none;
    padding: 0 2px;
}

/* Beautiful hover/focus styling */
.text a:hover,
.text a:focus,
.center .text a:hover,
.center .text a:focus {
    color: #5ccdff;
    text-shadow: 0 2px 9px #5ccdff44;
    outline: none;
}

/* Only use display:flex for .text where you need image–text alignment, like project cards: */
.project-post .text,
#main > div .text.with-image {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

/* ==== Sidebar Nav ==== */
#content {
    display: flex;
    gap: 44px;
    max-width: 1200px;
    margin: 0 auto 58px;
}
#side-nav {
    position: sticky; top: 90px; align-self: flex-start;
    display: flex; flex-direction: column; gap: 15px;
    background: #f4f9ff;
    border-radius: 20px;
    box-shadow: 0 6px 22px #7bc2b210;
    min-width: 170px;
    padding: 28px 20px;
}
#side-nav a {
    color: #3253a5;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.08em;
    padding: 11px 14px;
    border-radius: 9px;
    transition: background .18s, color .18s;
}
#side-nav a:hover, #side-nav a:focus {
    background: #6ec3fa22;
    color: #3892d6;
    outline: none;
}
/* ==== Main Projects Content ==== */
#main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 70px;
}

/* ==== Individual Project Section ==== */
#main > div {
    background: #eaf4fd;
    border-radius: 18px;
    box-shadow: 0 2px 18px #6ec3fa12;
    padding: 38px 35px 35px 30px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.project-intro {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.title {
    font-size: 1.21em;
    font-weight: bold;
    color: #417aec;
    letter-spacing: .7px;
    margin-bottom: 2px;
}
.project-link {
    width: 25px;
    height: 25px;
    border-radius: 7px;
    margin-left: 5px;
    transition: transform 0.14s, box-shadow 0.14s;
    box-shadow: 0 2px 8px #8ac8f623;
}

.project-link:hover {
    transform: scale(1.18);
    box-shadow: 0 4px 22px #8ac8f644;
}

.text {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    line-height: 1.6;
    font-size: 1.08em;
    color: #355186;
    flex-wrap: wrap;
}

/* ==== Project Images: Always aligned vertically ==== */
.text img {
    width: 104px;
    height: 104px;
    object-fit: cover;
    border-radius: 13px;
    box-shadow: 0 3px 16px #8ac8f634;
    background: #fff;
    flex-shrink: 0;
    margin-right: 0;
    margin-bottom: 0;
    display: block;
    align-self: flex-start;
}

/* If image is after text, align nicely. If image is before text, same. */
#main .text {
    align-items: center;
}

/* ==== Responsive ==== */
@media (max-width: 900px) {
    #content,
    #main,
    #side-nav {
        flex-direction: column !important;
        gap: 20px;
        max-width: 98vw;
    }
    #side-nav {
        position: static;
        min-width: auto;
        margin-bottom: 16px;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }
    #main > div {
        padding: 28px 8px 22px 8px;
    }
    .text {
        flex-direction: column;
        gap: 12px;
        font-size: 1em;
    }
    .text img {
        width: 70px;
        height: 70px;
        margin-bottom: 8px;
    }
    .title {
        font-size: 1.09em;
    }
    .project-link {
        width: 22px;
        height: 22px;
        margin-left: 0;
    }
}
@media (max-width: 520px) {
    .text img {
        width: 56px;
        height: 56px;
    }
    .title { font-size: 1em; }
    #main > div { padding: 11px 2vw; }
}
.project-link:focus {
    outline: 2px solid #417aec;
    outline-offset: 2px;
}

/* ==== Misc ==== */
a {
    transition: color 0.15s;
}
a:focus { outline: 2px solid #417aec; outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; background: transparent; }
::-webkit-scrollbar-thumb { background: #e7f4fd; border-radius: 8px; }