/*
Theme Name: Hasan Bilgin
Theme URI: https://hasanbilgin.com
Author: Hasan Bilgin
Description: Minimal personal blog theme for D365 FO content
Version: 1.0
License: GNU General Public License v2 or later
*/

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

:root {
    --accent: #185fa5;
    --text: #1a1a1a;
    --muted: #666;
    --border: #e5e5e5;
    --bg: #fff;
    --max-width: 720px;
}

html {
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout */
.site-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header / Nav */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    margin-bottom: 40px;
}

.site-header .site-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.site-title a:hover {
    color: var(--accent);
}

.main-nav {
    display: flex;
    gap: 24px;
    list-style: none;
}

.main-nav a {
    font-size: 13px;
    color: var(--muted);
}

.main-nav a:hover {
    color: var(--text);
}

/* Bio */
.site-bio {
    margin-bottom: 36px;
    font-size: 14px;
    color: var(--muted);
}

/* Post list */
.post-list {
    list-style: none;
    border-top: 1px solid var(--border);
}

.post-list-item {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.post-list-date {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    min-width: 72px;
    flex-shrink: 0;
}

.post-list-title {
    font-size: 14px;
    line-height: 1.5;
}

.post-list-title a:hover {
    color: var(--accent);
}

.post-list-tag {
    font-size: 11px;
    color: var(--muted);
    margin-left: 6px;
    white-space: nowrap;
}

/* Single post */
.post-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.post-meta {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 12px;
    align-items: center;
}

.post-content {
    font-size: 15px;
    line-height: 1.8;
    color: #222;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    font-weight: 600;
    line-height: 1.3;
    margin: 2em 0 0.6em;
    letter-spacing: -0.01em;
}

.post-content h2 { font-size: 18px; }
.post-content h3 { font-size: 16px; }

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

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content ul,
.post-content ol {
    margin: 0 0 1.2em 1.5em;
}

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

.post-content pre,
.post-content code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 13px;
}

.post-content pre {
    background: #f6f8fa;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px;
    overflow-x: auto;
    margin: 1.4em 0;
    line-height: 1.6;
}

.post-content code {
    background: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-content blockquote {
    border-left: 3px solid var(--border);
    padding-left: 16px;
    color: var(--muted);
    margin: 1.4em 0;
    font-style: italic;
}

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

.post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 1.4em 0;
}

.post-content th,
.post-content td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}

.post-content th {
    background: #f6f8fa;
    font-weight: 600;
}

/* Post navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--muted);
    gap: 16px;
}

.post-nav a {
    color: var(--accent);
}

.post-nav a:hover {
    text-decoration: underline;
}

/* Archive */
.archive-year {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 32px 0 8px;
}

.archive-year:first-child {
    margin-top: 0;
}

/* About page */
.page-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.page-content {
    font-size: 15px;
    line-height: 1.8;
    color: #222;
}

.page-content p {
    margin-bottom: 1.2em;
}

.page-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 64px;
    padding: 24px 0;
}

.site-footer .site-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    font-size: 12px;
    color: var(--muted);
}

.footer-right {
    display: flex;
    gap: 16px;
}

.footer-right a {
    font-size: 12px;
    color: var(--muted);
}

.footer-right a:hover {
    color: var(--text);
}

/* Responsive */
@media (max-width: 600px) {
    .site-wrapper {
        padding: 0 16px;
    }

    .post-list-item {
        flex-direction: column;
        gap: 4px;
    }

    .post-list-date {
        min-width: auto;
    }

    .post-title {
        font-size: 18px;
    }

    .main-nav {
        gap: 16px;
    }
}
