/* 
   Premium Minimalist Theme for Hugo (AdSense Optimized)
   Based on Apple-like clean aesthetics, soft shadows, and high readability typography.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #000000;
    --secondary: #f5f5f7;
    --bg-color: #ffffff;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --border-color: #d2d2d7;
    --hover-bg: #f5f5f7;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    --hover-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Header & Nav */
.site-header {
    background-color: #f8fafc;
    background-image: url('../images/header-bg.png');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 200px;
    transition: height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.site-header.scrolled {
    height: 70px;
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    color: #0f172a;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 6px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.site-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: #334155;
    letter-spacing: -0.3px;
    display: block;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    max-height: 120px;
    white-space: pre-line;
    line-height: 1.5;
}

/* Scrolled state */
.site-header.scrolled .site-title {
    font-size: 22px;
    margin-bottom: 0;
}

.site-header.scrolled .site-subtitle {
    opacity: 0;
    max-height: 0;
    font-size: 0;
    margin: 0;
    padding: 0;
    line-height: 0;
    overflow: hidden;
}

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

.site-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

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

/* Layout */
.layout-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 60px;
    min-height: calc(100vh - 200px);
}

@media (max-width: 900px) {
    .layout-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.main-content {
    min-width: 0;
    /* prevents flex/grid blowout */
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sidebar-title {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: -10px 0;
}

.about-me .sidebar-title {
    border-bottom: 0;

}

.widget {
    background: var(--bg-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.widget-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* About Me Sidebar */
.about-text {
    text-align: left;
}

.profile-img-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    background-color: #f1f5f9;
    margin: 0 auto 20px auto;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.profile-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-box {
    background: #f1f5f9;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.contact-box span {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #334155;
}

.contact-box a {
    color: #0ea5e9;
    font-weight: bold;
    text-decoration: none;
}

.contact-box a:hover {
    text-decoration: underline;
}

/* Tags & Categories */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item,
.cat-item {
    display: inline-block;
    background-color: var(--secondary);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.tag-item:hover,
.cat-item:hover {
    background-color: var(--text-main);
    color: #fff;
}

/* Home List (Cards) */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.posts-list .post-item {
    border-radius: 0;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 0;
    padding: 32px 0;
    box-shadow: none;
    transition: all 0.2s ease;
    border: none;
    border-bottom: 1px solid #e2e8f0;
}

.post-card:hover {
    box-shadow: none;
    transform: none;
    opacity: 0.8;
}

.post-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 12px;
}

.post-card-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 16px;
    line-height: 1.2;
    color: var(--text-main);
}

.post-card-summary {
    font-size: 16px;
    color: #515154;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Pagination */
.pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.page-arrow,
.page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary);
    color: var(--text-main);
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}

.page-arrow:hover,
.page-num:hover {
    background: #e5e5ea;
}

.page-num.active {
    background: var(--text-main);
    color: #fff;
}

.page-arrow.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Single Post */
.single-article {
    background: transparent;
    padding: 0;
}

.single-header {
    margin-bottom: 40px;
    text-align: center;
}

.single-meta-top {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.single-title {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -1.2px;
    line-height: 1.2;
    margin-bottom: 24px;
}

.single-meta-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-muted);
}

.single-featured-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 48px;
    box-shadow: var(--card-shadow);
}

.single-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333336;
}

.single-content p {
    margin-bottom: 28px;
}

.single-content h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-top: 56px;
    margin-bottom: 24px;
    color: var(--text-main);
}

.single-content h3 {
    font-size: 22px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 16px;
}

.single-content blockquote {
    border-left: 4px solid var(--text-main);
    padding-left: 20px;
    margin-left: 0;
    font-style: italic;
    color: var(--text-muted);
}

/* AdSense Slots */
.adsense-slot {
    background: var(--secondary);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    margin: 40px 0;
}

/* Footer */
.site-footer {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

/* Extracted from home.html */
.posts-list {
    display: flex;
    flex-direction: column;
}

.post-item {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    padding: 40px 0;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    margin: 0 -20px;
    padding: 40px 20px;
}

.post-item:first-of-type {
    padding-top: 20px;
}

.post-item:last-of-type {
    border-bottom: none;
}

.post-item:hover {
    background-color: var(--hover-bg);
    transform: translateY(-2px);
}

.post-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.3;
    color: var(--text-main);
}

.post-summary {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
}

/* Pagination */
.pagination {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.page-arrow {
    font-size: 24px;
    text-decoration: none;
    color: var(--text-main);
    transition: color 0.2s;
}

.page-arrow:hover {
    color: var(--primary);
}

.page-numbers {
    display: flex;
    gap: 12px;
}

.page-numbers a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.page-numbers a:hover {
    background-color: var(--hover-bg);
    color: var(--text-main);
}

.page-numbers a.active {
    background-color: var(--text-main);
    color: #fff;
    font-weight: 700;
}