html, body {
    min-height: 100%;
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: #eef1f5;
    color: #232c3d;
    font-size: 1rem;
    scroll-behavior: smooth;
}

header {
    text-align: center;
    padding: 2rem 1rem 1rem 1rem;
    background: #fff;
    box-shadow: 0 4px 24px rgba(44, 62, 80, 0.07);
    border-radius: 0 0 28px 28px;
    margin-bottom: 1.2rem;
}

header .profile-img {
    box-shadow: 0 3px 20px rgba(45, 84, 136, 0.13);
    border: 3px solid #e7e8ea;
    margin-bottom: 0.7rem;
    object-fit: cover;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

header h1 {
    color: #173168;
    font-size: 2rem;
    margin-bottom: 0.4em;
}

header p {
    font-size: 1rem;
    margin-bottom: 1.3em;
}

header a {
    color: #336699;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #33669922;
    transition: color 0.2s, border 0.2s;
}
header a:hover {
    color: #16335b;
    border-bottom: 2px solid #173168cc;
}

/* Nav block links */
.section-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8em;
    margin: 1em 0 0 0;
}
.nav-link {
    display: inline-block;
    padding: 0.7em 1.5em;
    background: #e7e8ea;
    color: #173168;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
    font-size: 1.22em;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 4px #c2c9d6a5;
    border: 1px solid #d3d7e1;
    transition: background 0.18s, color 0.18s, box-shadow 0.2s;
}
.nav-link:hover, .nav-link:focus {
    background: #c7d0db;
    color: #336699;
    box-shadow: 0 4px 16px #c2c9d6c7;
    text-decoration: none;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 1vw;
    padding-right: 1vw;
    padding-bottom: 1.2rem;
    font-size: 1em;
}

.section-row {
    border-radius: 12px;
    box-shadow: 0 1px 10px 0 rgba(44, 62, 80, 0.10);
    border: 1px solid #e2e6ea;
    margin-bottom: 1.2rem;
    padding: 1.2rem 1.2rem 1rem 1.2rem;
    position: relative;
    padding-left: 1vw;
    padding-right: 1vw;
}

.section-content {
    gap: 0.7em;
}

.item-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 1.1rem;
    margin-bottom: 1.1rem;
    width: 100%;
    min-height: 90px;
}
.reverse-row {
    grid-template-columns: 1fr 140px;
}
.reverse-row .item-text { grid-column: 1; }
.reverse-row .image-block,
.reverse-row .banner-block { grid-column: 2; }

.image-block, .banner-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: #f3f4f7;
    border-radius: 8px;
    box-shadow: 0 1px 4px #c2c9d6a5;
    border: 1px solid #e2e6ea; /* Slimmer border */
    margin: 0.7em 1em 0.7em 0; /* Add more right and vertical margin */
    overflow: hidden; /* Prevent content spill */
    min-width: 90px;
    min-height: 60px;
}

/* Ensure text does not wrap around image-block or banner-block */
.image-block, .banner-block {
    float: none;
    clear: both;
}

.item-row, .reverse-row {
    align-items: flex-start;
}

.square-img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    background: #fff;
}
.banner-img {
    width: 120px;
    height: 45px;
    border-radius: 6px;
}

.item-text {
    min-width: 0;
}
.item-text h3 {
    margin-top: 0;
    font-size: 1em;
    color: #254b83;
    font-weight: 700;
    margin-bottom: 0.18em;
}
ul, li {
    margin: 0;
    padding: 0;
    list-style: disc inside;
}
.item-text ul {
    margin-left: 1.1em;
    margin-bottom: 0.3em;
    line-height: 1.8;
}
.item-date {
    color: #6689b4;
    font-weight: 400;
    font-size: 0.98em;
    margin-left: 0.6em;
}
h2 {
    font-size: 1.1rem;
    border-left-width: 3px;
    padding-left: 0.4em;
    margin-bottom: 0.7em;
    margin-top: 0;
}

/* Modern, semantic image block styling */
.figure-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border-radius: 15px;
    box-shadow: none;
    border: none;
    margin: 1.5em 2em 1.5em 0;
    overflow: hidden;
    min-width: 180px;
    min-height: 120px;
    padding: 0;
    max-width: 350px;
}
.figure-block img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    margin-bottom: 0;
    border: none;
    box-shadow: none;
}

/* Profile image, education, and work images keep their style */
header .profile-img {
    box-shadow: 0 3px 20px rgba(45, 84, 136, 0.13);
    border: 3px solid #e7e8ea;
    margin-bottom: 0.7rem;
    object-fit: cover;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Remove border/box for all other images */
.image-block,
.image-block img,
.square-img,
.banner-img,
img:not(.profile-img) {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.banner-block,
.banner-block img,
.banner-img {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.verify-btn {
    display: block;
    margin: 12px auto 0 auto;
    padding: 6px 18px;
    background: #0073e6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    cursor: pointer;
}
.verify-btn:hover, .verify-btn:focus {
    background: #005bb5;
    color: #fff;
    text-decoration: none;
}

.edu-minor {
    font-weight: 500;
    color: #0073e6;
    margin-left: 6px;
}

.section-content .item-text p strong {
    font-size: 1.08em;
    color: #222;
    letter-spacing: 0.01em;
}

#scrollTopBtn {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    background: #173168;
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(44,62,80,0.18);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
}
#scrollTopBtn:hover, #scrollTopBtn:focus {
    background: #336699;
    box-shadow: 0 4px 16px rgba(44,62,80,0.22);
}

@media (max-width: 1000px) {
    main {
        padding-left: 1vw;
        padding-right: 1vw;
    }
    .section-row {
        padding-left: 1vw;
        padding-right: 1vw;
    }
    .square-img {
        width: 120px;
        height: 120px;
    }
    .banner-block { width: 98vw; max-width: 350px; height: 90px; }
    .square-img, .banner-img { width: 100%; height: 90%; }
    header .profile-img {
        width: 90px;
        height: 90px;
    }
}

@media (max-width: 900px) {
    main {
        max-width: 98vw;
        padding-left: 0.5vw;
        padding-right: 0.5vw;
    }
    .section-row {
        padding: 1rem 0.5rem 0.8rem 0.5rem;
    }
    .item-row, .reverse-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        min-height: unset;
    }
    .image-block, .banner-block {
        margin: 0.5em auto 0.5em auto;
        min-width: 80px;
        min-height: 60px;
        max-width: 180px;
    }
    .square-img, .banner-img {
        width: 90px !important;
        height: 90px !important;
        margin: 0 auto;
    }
    header .profile-img {
        width: 70px;
        height: 70px;
    }
    h2 {
        font-size: 1.1rem;
        padding-left: 0.4em;
    }
    .item-text h3 {
        font-size: 1em;
    }
    .section-nav {
        flex-wrap: wrap;
        gap: 0.4em;
        font-size: 1em;
    }
    .nav-link {
        padding: 0.5em 1em;
        font-size: 1em;
    }
    footer {
        font-size: 0.9rem;
        padding-bottom: 0.5rem;
    }
}

@media (max-width: 600px) {
    header {
        padding: 1.2rem 0.2rem 1rem 0.2rem;
    }
    header h1 {
        font-size: 1.1rem;
    }
    .section-row {
        padding: 0.5rem 0.1rem 0.3rem 0.1rem;
        border-radius: 8px;
    }
    .image-block, .banner-block {
        width: 90vw !important;
        max-width: 120px;
    }
    .square-img, .banner-img {
        width: 70px !important;
        height: 70px !important;
    }
    .item-text h3 {
        font-size: 0.95em;
    }
    h2 {
        font-size: 1em;
        border-left-width: 2px;
        padding-left: 0.3em;
    }
    .section-content {
        gap: 0.5em;
    }
    .nav-link {
        padding: 0.4em 0.7em;
        font-size: 0.95em;
    }
    ul, li {
        font-size: 0.95em;
    }
    #scrollTopBtn {
        width: 32px;
        height: 32px;
        font-size: 1em;
    }
}

@media (max-width: 1400px) {
    main {
        padding-left: 2vw;
        padding-right: 2vw;
    }
    .section-row {
        padding-left: 2vw;
        padding-right: 2vw;
    }
}