body {
    font-family: Times, "Times New Roman", Georgia, serif;
    font-size: 17px;
    line-height: 1.5;
    color: #000;
    background: #fff;
    max-width: 920px;
    margin: 30px auto;
    padding: 0 20px;
}
a {
    color: #0000ee;
    text-decoration: underline;
}
a:visited {
    color: #551a8b;
}
h1 {
    font-size: 2em;
    font-weight: bold;
    margin: 0 0 4px 0;
}
h2 {
    font-size: 1.4em;
    font-weight: bold;
    margin: 28px 0 10px 0;
}
p {
    margin: 0 0 10px 0;
}
.links {
    margin-bottom: 14px;
}
.clear {
    clear: both;
}
.divider {
    text-align: center;
    color: #aaa;
    margin: 28px 0;
    letter-spacing: 8px;
}
ul {
    margin: 6px 0 12px 0;
    padding-left: 22px;
}
li {
    margin-bottom: 4px;
}
.meta {
    color: #555;
    font-style: italic;
}
small {
    color: #555;
}
html {
    scroll-behavior: smooth;
}
h1,
h2 {
    scroll-margin-top: 60px;
}

/* top nav */
.topnav {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #ccc;
    padding: 8px 0;
    margin-bottom: 24px;
    font-size: 0.95em;
    z-index: 10;
}
.topnav-inner {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.nav-logo {
    display: flex;
    align-items: center;
    margin-right: 2px;
}
.nav-logo img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 20%;
    display: block;
}
.topnav a {
    color: #0000ee;
}
.theme-toggle {
    margin-left: auto;
    font-family: inherit;
    font-size: 0.9em;
    background: none;
    border: 1px solid #ccc;
    padding: 1px 10px;
    cursor: pointer;
    color: inherit;
}

/* intro portrait */
.portrait {
    float: right;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 20%;
    margin: 2px 0 12px 20px;
}

/* experience / education entries */
.entry {
    margin-bottom: 16px;
    overflow: hidden;
}
.entry-head-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}
.entry-head {
    font-weight: bold;
}
.entry-sub {
    color: #555;
    font-style: italic;
    font-size: 0.95em;
}
.entry-score {
    font-family: "SF Mono", ui-monospace, Menlo, monospace;
    font-size: 0.82em;
    color: #555;
    font-variant-numeric: tabular-nums;
}

/* email copy-to-clipboard widget */
.email-copy {
    position: relative;
    cursor: pointer;
    border-bottom: 1px dotted currentColor;
}
.email-copy-tip {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.15s ease,
        transform 0.15s ease,
        visibility 0.15s;
    background: #24292f;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}
.email-copy-tip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-7px);
}

footer {
    margin-top: 40px;
    text-align: center;
    color: #888;
    font-size: 0.85em;
}

@media (max-width: 560px) {
    .portrait {
        float: none;
        display: block;
        margin: 0 0 12px 0;
    }
}

/* dark mode */
html.dark body,
html.dark .topnav {
    background: #121212;
    color: #ddd;
}
html.dark a,
html.dark .topnav a {
    color: #8ab4f8;
}
html.dark a:visited {
    color: #c8a2f0;
}
html.dark .topnav,
html.dark .theme-toggle {
    border-color: #444;
}
html.dark .meta,
html.dark .entry-sub,
html.dark .entry-score,
html.dark small {
    color: #999;
}
html.dark .email-copy-tip {
    background: #ddd;
    color: #121212;
}
