html {
    background-color: #ffffff;
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #111;
}

a:link,
a:visited {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

a:hover {
    color: #555;
}

/* Top bar: domain on the left, icons on the right */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.1rem;
    font-size: 0.85rem;
}

.site-header .home {
    text-decoration: none;
}

.site-header .home:hover {
    text-decoration: underline;
}

.social {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.social a {
    display: inline-flex;
    line-height: 0;
    color: #111;
}

.social svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: currentColor;
}

main {
    max-width: 39rem;
    margin: 0 auto;
    padding: 3rem 1rem 5rem;
}

h1 {
    font-size: 1.85rem;
    font-weight: 400;
    font-style: italic;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.25rem;
    font-weight: 400;
    font-style: italic;
    margin: 1.8rem 0 0.5rem;
}

p {
    margin: 0 0 1rem;
}

ul {
    margin: 0 0 1rem;
    padding-left: 2.5rem;
}

li {
    margin-bottom: 0.1rem;
}

.more {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.6rem;
}

.more a {
    color: #555;
}

/* Hero photo */
.hero {
    margin: 2.75rem 0 1.5rem;
}

.hero img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.hero figcaption {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.45rem;
}

/* Blog */
.post-list {
    list-style: none;
    padding: 0;
}

.post-list li {
    margin-bottom: 0.6rem;
}

.post-list time,
.post-date {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

.post-date {
    margin: -0.6rem 0 1.5rem;
}

article h2 {
    font-style: normal;
    font-size: 1.15rem;
    margin-top: 1.6rem;
}

pre {
    font-size: 0.85rem;
    line-height: 1.45;
    background: #f6f6f6;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    overflow-x: auto;
}

code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9em;
}

/* GitHub contributions */
.contrib {
    margin-top: 0.25rem;
}

.contrib-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 1fr);
    gap: 3px;
}

.contrib-grid span {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 1.5px;
    background: #ebedf0;
}

.contrib-grid .l1 { background: #9be9a8; }
.contrib-grid .l2 { background: #40c463; }
.contrib-grid .l3 { background: #30a14e; }
.contrib-grid .l4 { background: #216e39; }

.contrib-caption {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #333;
    margin-top: 0.45rem;
}

.contrib-caption a {
    color: #333;
    text-decoration: none;
}

.contrib-caption a:hover {
    text-decoration: underline;
}

/* Project and paper lists */
.item {
    margin-bottom: 1.1rem;
}

.item p {
    margin: 0 0 0.2rem;
}

.item .meta {
    font-size: 0.85rem;
    color: #666;
}

.item .status {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

@media (max-width: 480px) {
    html { font-size: 16px; }
    main { padding-top: 2rem; }
    ul { padding-left: 1.5rem; }
}
