:root {
    color-scheme: dark;
    --bg: #202124;
    --panel: #27292d;
    --panel-strong: #2f3237;
    --border: #34383e;
    --text: #d7dadf;
    --text-soft: #b5bac3;
    --text-faint: #8c929d;
    --link: #c3c7ce;
    --link-hover: #e2e5e9;
    --code-bg: #191b1f;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    --content-width: 44rem;
}

@font-face {
    font-family: "Source Code Pro";
    src: url("blog/pepe-writeup/source-code-pro-400-normal.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Source Code Pro";
    src: url("blog/pepe-writeup/source-code-pro-400-italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Source Code Pro";
    src: url("blog/pepe-writeup/source-code-pro-700-normal.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Source Code Pro";
    src: url("blog/pepe-writeup/source-code-pro-700-italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 700;
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
    font-size: 18px;
    line-height: 1.72;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid rgba(195, 199, 206, 0.32);
    transition: color 160ms ease, border-color 160ms ease;
}

a:hover {
    color: var(--link-hover);
    border-color: rgba(226, 229, 233, 0.55);
}

strong {
    color: #eef1f4;
    font-weight: 650;
}

em {
    color: #e3e6ea;
}

sup {
    position: relative;
    top: -0.45em;
    font-size: 0.7em;
    line-height: 0;
    vertical-align: baseline;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    background: var(--panel);
    box-shadow: var(--shadow);
}

code {
    font-family: "Source Code Pro", "SFMono-Regular", Consolas, monospace;
    font-size: 0.9em;
}

.home-page,
.site-page {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.nav {
    width: min(100%, 17rem);
    min-height: 100vh;
    padding: 1rem 0.9rem 1.4rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 12rem),
        rgba(24, 25, 28, 0.78);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
    flex: 0 0 17rem;
}

.nav-kicker,
.nav-section-label {
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.nav-header {
    padding: 0.25rem 0.45rem 1.1rem;
}

#page-title {
    margin: 0.2rem 0 0;
    color: #f1f3f4;
    font-size: clamp(2.25rem, 6vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.04;
}

.nav-section-label {
    display: block;
    padding: 0 0.45rem 0.55rem;
}

.nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav li + li {
    margin-top: 0.15rem;
}

.nav a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 0.72rem 0.8rem;
    border: 1px solid transparent;
    color: var(--text-soft);
    text-transform: none;
    letter-spacing: 0.01em;
    font-size: 1rem;
    background: transparent;
}

.nav a:hover {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: #eef1f4;
}

.nav a[aria-current="page"] {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: #eef1f4;
}

.site-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 3rem 2rem 4rem;
}

.site-column {
    width: min(100%, 52rem);
    margin: 0 auto;
}

.site-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13rem;
    gap: 1.5rem;
    align-items: end;
}

.home-hero-copy {
    min-width: 0;
}

.home-portrait-wrap {
    display: flex;
    justify-content: flex-end;
}

.home-portrait {
    width: 13rem;
    max-width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    object-fit: cover;
}

.site-kicker {
    margin: 0 0 0.45rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}

.site-title {
    margin: 0;
    color: #f1f3f4;
    font-size: clamp(2.4rem, 6vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.site-subtitle {
    margin: 0.9rem 0 0;
    max-width: 40rem;
    color: var(--text-soft);
}

.stack {
    display: grid;
    gap: 1rem;
}

.card {
    padding: 1.2rem 1.25rem;
    border: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 55%),
        var(--panel);
    box-shadow: var(--shadow);
}

.card h2,
.card h3 {
    margin-top: 0;
}

.card p:last-child,
.card ul:last-child,
.card ol:last-child {
    margin-bottom: 0;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-top: 0.75rem;
    color: var(--text-faint);
    font-size: 0.92rem;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1rem;
    margin-top: 1rem;
}

.inline-links a {
    border-bottom-color: rgba(195, 199, 206, 0.28);
}

.post-list,
.project-list,
.resume-section-list {
    display: grid;
    gap: 1rem;
}

.post-card-title,
.project-card-title,
.resume-role {
    margin: 0;
    color: #f1f3f4;
    font-size: 1.25rem;
    line-height: 1.2;
}

.resume-section-title {
    margin: 0 0 1.35rem;
    color: #f1f3f4;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.post-date,
.resume-meta {
    margin: 0.4rem 0 0;
    color: var(--text-faint);
    font-size: 0.92rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.2rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-soft);
    font-size: 0.82rem;
    background: rgba(255, 255, 255, 0.03);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
    gap: 1rem;
}

.contact-form {
    display: grid;
    gap: 0.95rem;
}

.contact-form label {
    display: grid;
    gap: 0.45rem;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    background: rgba(12, 13, 15, 0.35);
    color: var(--text);
    font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 1px solid rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.18);
}

.contact-form textarea {
    min-height: 11rem;
    resize: vertical;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 0.8rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #eef1f4;
    font: inherit;
    cursor: pointer;
}

.button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.resume-intro {
    display: grid;
    gap: 0.3rem;
    margin-bottom: 1.5rem;
}

.resume-intro p {
    margin: 0;
}

.resume-summary {
    max-width: 46rem;
}

.resume-bullets {
    margin-top: 0.9rem;
}

.resume-entry + .resume-entry {
    margin-top: 2rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.resume-bullets li + li {
    margin-top: 0.55rem;
}

#main-horizontal,
#center-content,
.obsidian-document,
.markdown-preview-sizer,
.markdown-preview-section {
    width: 100%;
}

#left-content,
.sidebar,
.sidebar-topbar,
.sidebar-content-wrapper,
.sidebar-handle {
    display: none !important;
}

#main,
#main-horizontal {
    min-height: 100vh;
}

.blog-post-page #main {
    min-width: 0;
    padding: 3rem 2rem 4rem;
}

.blog-post-page #main-horizontal {
    min-height: 0;
}

.blog-post-page #navbar {
    display: none !important;
}

#center-content {
    display: flex;
    justify-content: center;
    padding: 3rem 1.5rem 5rem;
}

.blog-post-page #center-content {
    padding: 0;
}

.obsidian-document {
    max-width: calc(var(--content-width) + 6rem);
}

.markdown-preview-sizer {
    max-width: var(--content-width);
    margin: 0 auto;
}

.markdown-preview-pusher,
.data-bar {
    display: none;
}

.header {
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer {
    margin-top: 3rem;
}

.page-title,
h1,
h3,
h4 {
    margin: 0;
    color: #f1f3f4;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.18;
}

.page-title,
h1 {
    font-size: clamp(2.4rem, 7vw, 3.6rem);
}

h3 {
    margin-top: 2.75rem;
    font-size: 1.55rem;
}

h4 {
    margin-top: 2.2rem;
    font-size: 1.2rem;
    color: #e2e5e9;
}

.el-p,
.el-ul,
.el-ol,
.el-pre,
.el-h3,
.el-h4 {
    margin: 0;
    margin-top: 12px;
}

p,
ul,
ol,
pre {
    margin: 1rem 0 0;
}

p:first-child,
ul:first-child,
ol:first-child,
pre:first-child {
    margin-top: 0;
}

p {
    color: var(--text);
}

ul,
ol {
    padding-left: 1.4rem;
    color: var(--text-soft);
}

li + li {
    margin-top: 0.45rem;
}

.heading {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.heading-collapse-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    color: var(--text-faint);
}

.heading-collapse-indicator svg {
    width: 0.9rem;
    height: 0.9rem;
}

.internal-embed.image-embed {
    display: inline-block;
    margin: 0.85rem 0 0;
    max-width: 100%;
}

pre {
    position: relative;
    overflow-x: auto;
    padding: 1.05rem 1.15rem;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent), var(--code-bg);
    color: #dfe3e8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

pre code {
    display: block;
    white-space: pre;
    line-height: 1.58;
}

.token.keyword,
.token.atrule {
    color: #c792ea;
}

.token.string,
.token.attr-value {
    color: #c3e88d;
}

.token.function,
.token.class-name {
    color: #82aaff;
}

.token.comment {
    color: #6f7782;
}

.token.number,
.token.boolean {
    color: #f7c06a;
}

.token.operator,
.token.punctuation {
    color: #b9bec7;
}

@media (max-width: 768px) {
    body {
        font-size: 17px;
    }

    .home-page {
        display: block;
    }

    .site-page {
        display: block;
    }

    .nav {
        width: 100%;
        min-height: auto;
        padding: 0.65rem 0.85rem 0.7rem;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        flex-basis: auto;
        position: sticky;
        top: 0;
        z-index: 20;
        backdrop-filter: blur(14px);
    }

    .nav-header {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 1rem;
        padding: 0 0 0.55rem;
    }

    .nav-kicker {
        font-size: 0.68rem;
    }

    #page-title {
        font-size: 1.05rem;
        letter-spacing: 0;
        line-height: 1.2;
    }

    .nav-section-label {
        display: none;
    }

    .nav ul {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.4rem;
        overflow-x: auto;
        padding-bottom: 0.1rem;
        scrollbar-width: none;
    }

    .nav ul::-webkit-scrollbar {
        display: none;
    }

    .nav li + li {
        margin-top: 0;
    }

    .nav a {
        padding: 0.42rem 0.72rem;
        font-size: 0.92rem;
        white-space: nowrap;
        border-color: rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.02);
    }

    .site-main {
        padding: 2rem 1rem 3rem;
    }

    .blog-post-page #main {
        padding: 2rem 1rem 3rem;
    }

    .home-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .home-portrait-wrap {
        justify-content: flex-start;
    }

    .home-portrait {
        width: min(14rem, 55vw);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    #center-content {
        padding: 2rem 1rem 3rem;
    }

    .blog-post-page #center-content {
        padding: 0;
    }

    .header {
        margin-bottom: 2.25rem;
    }

    h3 {
        margin-top: 2.3rem;
    }

    h4 {
        margin-top: 1.8rem;
    }

    pre {
        padding: 1rem;
    }

}
