/* Code syntax highlighting */
@import url("/assets/css/syntax.css");

:root {
    --bg: #f8f8f8;
    --bg-elevated: #ffffff;
    --surface: #f1f1f1;
    --surface-strong: #e7e7e7;
    --text: #111111;
    --text-soft: #444444;
    --text-muted: #666666;
    --border: #d9d9d9;
    --accent: #f26522;
    --accent-strong: #d45116;
    --shadow: rgba(0, 0, 0, 0.12);
    --search-highlight: #fff0a8;
    --code-bg: #f4f4f4;
}

html {
    background-color: var(--bg);
}

body {
    margin: 0px;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background-color 200ms ease, color 200ms ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url("/wall.jpg");
    background-size: cover;
    background-position: top;
    color: white;
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.profile-picture {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 750ms ease;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.3);
}

.profile-picture:hover {
    transform: rotate(360deg);
}

.rss-button {
    display: inline-block;
    background-color: #f26522;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    transition: 0.3s ease;
}

.rss-button:hover {
    background-color: #d45116;
}

.hero-content h1 {
    font-size: 35pt;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 20pt;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

/* Main content */
.section {
    max-width: 1140px;
    margin: 40px auto;
    padding: 0 20px;
}

.section h1 {
    text-align: center;
}

/* Default link style */
a {
    color: var(--text);
    transition: 100ms ease;
    display: inline-block;
}

a:hover {
    color: var(--bg-elevated);
    background-color: var(--text);
    text-decoration: none;
}

/* Post Styles */
.post {
    display: flex;
    align-items: stretch;
    border-radius: 5px;
    padding: 0;
    margin-bottom: 20px;
    transition: 150ms ease;
    background: var(--bg-elevated);
}

.post:hover {
    box-shadow: 0px 0px 15px var(--shadow);
}

.post:hover .post-image img {
    transform: scale(1.2);
}

.posts a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.posts a:hover {
    color: inherit;
    background: none;
}

.post-image {
    width: 400px;
    height: auto;
    min-height: 200px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 5px 0px 0px 5px;
}

.post > div:not(.post-image) {
    padding: 20px;
}

.post-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 350ms ease;
}

.post-date {
    font-size: 12pt;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.post-tags {
    margin-bottom: 10px;
}

.post-tag {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 3px 8px;
    border-radius: 50vw;
    font-size: 10pt;
    margin-right: 5px;
}

/* Paginator */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 35px 0;
}

.pagination a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: 0.2s ease;
}

.pagination a:hover {
    background-color: var(--surface);
}

.pagination .active {
    background-color: var(--text);
    color: var(--bg-elevated);
    padding: 8px 12px;
    border-radius: 5px;
}

.page-dots {
    padding: 8px 4px;
    color: var(--text-muted);
}

/* Responsiveness */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 25pt;
    }

    .hero-content p {
        font-size: 16pt;
    }

    .section {
        padding: 0 15px;
    }

    .post {
        flex-direction: column;
        overflow: hidden;
    }

    .post-image {
        width: 100%;
        height: 200px;
        margin: 0;
        border-radius: 5px 5px 0px 0px;
    }

    .post-image img {
        width: 100%;
        height: 100%;
    }

    .pagination {
        gap: 3px;
    }

    .pagination a {
        padding: 8px 10px;
    }
}

/* Post page */
.article {
    max-width: 850px;
    margin: 50px auto;
}

.article-header {
    margin-bottom: 30px;
}

.back-link {
    display: inline-block;
    text-decoration: none;
    margin-bottom: 25px;
}

.article-header h1 {
    font-size: 36pt;
}

.article-meta {
    display: flex;
    gap: 10px;
    color: var(--text-muted);
    font-size: 11pt;
    width: 100%;
    justify-content: center;
}

.article-cover {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: 8px;
}

.article-content {
    font-size: 13pt;
    line-height: 1.8;
    color: var(--text-soft);
}

.article-content blockquote {
    font-family: 'Georgia', serif;
    font-size: 16pt;
    border-left: 4px solid var(--accent);
    margin: 30px 0;
    padding: 10px 20px;
    background: var(--surface);
    border-radius: 0 5px 5px 0;
    font-style: italic;
    color: var(--text);
}

.article-footer {
    border-top: 1px solid var(--border);
    margin-top: 50px;
    padding-top: 25px;
}

.article-footer a {
    text-decoration: none;
}

.article-content h1,
.article-content h2 {
    text-align: left;
    margin: 0px;
    padding: 0px;
    color: var(--text);
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 5px;
}

.article-content pre {
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.article-content :not(pre) > code {
    background-color: var(--code-bg);
    padding: 2px 4px;
    border-radius: 3px;
}

.article-tags {
    text-align: center;
}

/* Search page */
#search-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin: 10px 0;
    color: var(--text-soft);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: 150ms ease;
}

#search-input:focus {
    box-shadow: 0 0 14px var(--shadow);
}

#results-container {
    list-style: none;
    padding: 0;
    margin: 0;
}

#results-container li {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

#results-container li:first-child {
    border-top: 1px solid var(--border);
}

#results-container a {
    color: var(--text);
    font-size: 17pt;
    font-weight: 600;
    text-decoration: none;
}

#results-container a:hover {
    text-decoration: underline;
    background-color: transparent;
}

.search-desc {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 12pt;
    line-height: 1.6;
}

.search-highlight {
    background-color: var(--search-highlight);
    color: var(--text);
    border-radius: 2px;
}