/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Base */
body {
    font-family: "IBM Plex Sans", "Pretendard", system-ui, sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 24px;
    line-height: 1.7;
    color: #111;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #111;
    text-decoration-color: #ccc;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: text-decoration-color 0.15s;
}

a:hover {
    text-decoration-color: #111;
}

@media (max-width: 600px) {
    body { padding: 32px 18px; }
}

/* Nav */
nav.site-nav {
    margin-bottom: 24px;
}

nav.site-nav a {
    font-size: 13px;
    color: #999;
    text-decoration: none;
    letter-spacing: 0.01em;
}

nav.site-nav a:hover {
    color: #111;
}

/* Homepage */
.home {
    font-family: "IBM Plex Mono", monospace;
    font-size: 17px;
    margin-top: 28vh;
    line-height: 1.9;
}

.home .prompt {
    margin-bottom: 8px;
    font-size: 19px;
}

.home .prompt .user { color: #22863a; font-weight: 500; }
.home .prompt .at { color: #444; }
.home .prompt .host { color: #22863a; font-weight: 500; }
.home .prompt .sep { color: #444; }
.home .prompt .path { color: #0366d6; }
.home .prompt .dollar { color: #444; margin-left: 2px; }

.home-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-left: 10px;
}

.home-nav a {
    color: #0366d6;
    text-decoration: none;
    transition: color 0.15s;
}

.home-nav a:hover {
    color: #22863a;
}

/* Post list */
.post-list {
    font-family: "IBM Plex Mono", "Pretendard", monospace;
    font-size: 17px;
    margin-top: 8px;
    line-height: 1.8;
}

.post-list .prompt {
    margin-bottom: 4px;
}

.post-list .prompt .user { color: #22863a; font-weight: 500; }
.post-list .prompt .at { color: #444; }
.post-list .prompt .host { color: #22863a; font-weight: 500; }
.post-list .prompt .sep { color: #444; }
.post-list .prompt .path { color: #0366d6; }
.post-list .prompt .dollar { color: #444; margin-left: 2px; }

.post-list .ls-header {
    color: #666;
    margin-bottom: 4px;
}

.post-list ul {
    list-style: none;
}

.post-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 1px 0;
    white-space: nowrap;
}

.post-list .perms {
    color: #666;
    width: 11ch;
    flex-shrink: 0;
}

.post-list time {
    color: #666;
    width: 12ch;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.post-list li a {
    color: #0366d6;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-list li a:hover {
    color: #22863a;
}

/* Single post */
article header {
    margin: 12px 0 40px 0;
}

article header h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: #111;
    margin-bottom: 8px;
}

article header time {
    color: #999;
    font-size: 14px;
}

/* Post content */
.post-content {
    font-size: 17px;
    line-height: 1.9;
    color: #111;
    overflow-wrap: break-word;
    word-break: break-word;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: #111;
    letter-spacing: -0.01em;
    line-height: 1.35;
    margin: 2em 0 0.6em 0;
}

.post-content h1 { font-size: 1.4em; font-weight: 600; }
.post-content h2 { font-size: 1.2em; font-weight: 600; }
.post-content h3 { font-size: 1.05em; font-weight: 600; }
.post-content h4 { font-size: 1em; font-weight: 600; }

.post-content h1 code,
.post-content h2 code,
.post-content h3 code,
.post-content h4 code {
    font-size: 0.9em;
    background: none;
    padding: 0;
}

.post-content p {
    margin: 0 0 1.2em 0;
}

.post-content a {
    color: #111;
    text-decoration-color: #aaa;
}

.post-content a:hover {
    text-decoration-color: #111;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Inline code */
.post-content code {
    font-family: "IBM Plex Mono", monospace;
    padding: 2px 6px;
    background: #f4f4f4;
    font-size: 0.85em;
    border-radius: 3px;
    word-break: break-all;
}

/* Code blocks */
.post-content pre {
    margin: 1.6em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.post-content pre code {
    display: block;
    background: #f7f7f7;
    padding: 18px 20px;
    white-space: pre;
    font-size: 13px;
    line-height: 1.65;
    border-radius: 6px;
    word-break: normal;
    tab-size: 4;
    border: 1px solid #eee;
}

/* Hugo syntax highlight */
.post-content .highlight {
    margin: 1.6em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.post-content .highlight pre {
    margin: 0;
    border-radius: 6px;
    background: #f7f7f7 !important;
    border: 1px solid #eee;
}

.post-content .highlight code {
    display: block;
    padding: 18px 20px;
    font-size: 13px;
    line-height: 1.65;
    background: none;
    border-radius: 0;
    word-break: normal;
    tab-size: 4;
    border: none;
}

.post-content .highlight span {
    background-color: transparent !important;
}

/* Blockquote */
.post-content blockquote {
    margin: 1.6em 0;
    padding: 0 0 0 20px;
    border-left: 2px solid #e0e0e0;
    color: #666;
}

.post-content blockquote p {
    margin: 0.5em 0;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 14px;
    overflow-x: auto;
    display: block;
}

.post-content thead {
    border-bottom: 2px solid #eee;
}

.post-content th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
}

.post-content td {
    padding: 10px 14px;
    text-align: left;
}

.post-content tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.post-content tbody tr:last-child {
    border-bottom: none;
}

/* Horizontal rule */
.post-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2.5em 0;
}

/* Lists */
.post-content ul,
.post-content ol {
    padding-left: 1.4em;
    margin: 0.8em 0 1.2em 0;
}

.post-content li {
    margin: 0.3em 0;
}

.post-content li p {
    margin: 0.4em 0;
}

.post-content li > p:only-child {
    margin: 0;
}

/* Strong/emphasis */
.post-content strong {
    font-weight: 600;
    color: #111;
}

/* 404 */
.not-found {
    margin-top: 20vh;
    text-align: center;
}

.not-found h1 {
    font-size: 48px;
    font-weight: 300;
    color: #ddd;
    margin-bottom: 8px;
}

.not-found p {
    color: #999;
    font-size: 15px;
}
