/*
Theme Name: Kathayidam
Theme URI: https://kathayidam.com
Author: Custom Developer
Description: A minimalist, high-readability platform for sharing stories and novels, inspired by Medium, featuring the Anek Malayalam typeface.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kathayidam
*/

:root {
    --primary-color: #ffb41b;
    --text-dark: #292929;
    --text-muted: #757575;
    --bg-light: #fafafa;
    --border-color: #e6e6e6;
    --font-malayalam: 'Anek Malayalam', sans-serif;
    --font-serif: 'Anek Malayalam', 'Georgia', Cambria, serif;
    --font-sans: 'Anek Malayalam', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

/* Header & Navigation */
.site-header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 100;
    backdrop-filter: blur(5px);
}

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

.site-logo img {
    height: 45px;
    width: auto;
    display: block;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

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

.write-btn {
    background-color: var(--primary-color);
    color: #000000 !important;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
}

.write-btn:hover {
    opacity: 0.9;
}

/* Main Layout */
.main-content {
    max-width: 1192px;
    margin: 40px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 64px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Feed & Article Cards */
.stories-feed {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.story-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 32px;
}

.story-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.story-author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #eee;
}

.story-title h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 4px;
}

.story-title h2 a:hover {
    color: var(--text-muted);
}

.story-excerpt {
    font-family: var(--font-serif);
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
}

.story-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Single Post View */
.single-post-container {
    max-width: 680px;
    margin: 60px auto;
    padding: 0 24px;
}

.post-header h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 32px;
}

.post-content {
    font-family: var(--font-serif);
    font-size: 19px;
    line-height: 1.8;
    color: var(--text-dark);
}

.post-content p {
    margin-bottom: 24px;
}

/* Sidebar */
.sidebar-panel {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

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