/*
Theme Name: Medium Style Theme
Description: A clean, minimalist WordPress theme inspired by Medium.com with focus on typography and readability
Author: Stalin Jayapal
Version: 1.0
Text Domain: medium-style-theme
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    line-height: 1.6;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #292929;
    background-color: #ffffff;
    font-weight: 400;
    letter-spacing: -0.003em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
    color: #1a1a1a;
    letter-spacing: -0.022em;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin: 2rem 0 1rem;
}

h3 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

h4 {
    font-size: 1.25rem;
    margin: 1.25rem 0 0.75rem;
}

p {
    margin: 0 0 1.5rem;
    font-size: 1.1rem;
    line-height: 1.58;
}

/* Links */
a {
    color: #1a8917;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0f5d0f;
    text-decoration: underline;
}

/* Container and Layout */
.container {
    margin: 0 auto;
    padding: 0 24px;
}

.wide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e6e6e6;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 0;
}

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

.site-title {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-title:hover {
    color: #1a8917;
    text-decoration: none;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: #6b6b6b;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-navigation a:hover {
    color: #1a1a1a;
    text-decoration: none;
}

/* Main Content */
.site-main {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

/* Article Styles */
.article-header {
    margin-bottom: 3rem;
    text-align: left;
}

.article-title {
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -0.032em;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.9rem;
    color: #6b6b6b;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    color: #1a1a1a;
    font-weight: 500;
}

.post-date {
    color: #6b6b6b;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.58;
    margin-bottom: 3rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content blockquote {
    border-left: 3px solid #1a8917;
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: #4a4a4a;
    background: #f9f9f9;
    padding: 1.5rem 2rem;
    border-radius: 0 4px 4px 0;
}

.article-content code {
    background: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'SF Mono', Monaco, 'Consolas', monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: #f4f4f4;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 2rem 0;
}

/* Featured Image */
.featured-image {
    margin: 2rem 0;
    text-align: center;
}

.featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Post Cards (for blog listing) */
.post-card {
    padding: 2rem 0;
    border-bottom: 1px solid #e6e6e6;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.post-card-title a:hover {
    color: #1a8917;
}

.post-card-excerpt {
    color: #6b6b6b;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.post-card-meta {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    color: #8a8a8a;
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Categories and Tags */
.post-categories, .post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.post-categories a, .post-tags a {
    background: #f2f2f2;
    color: #4a4a4a;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-categories a:hover, .post-tags a:hover {
    background: #1a8917;
    color: #ffffff;
    text-decoration: none;
}

/* Sidebar */
.sidebar {
    background: #fafafa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
}

/* Comments */
.comments-area {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e6e6e6;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    color: #a0a0a0;
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .site-main {
        padding: 2rem 0;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .container {
        padding: 0 12px;
    }
}

/* Animation and Transitions */
.post-card, .article-content img, .featured-image {
    transition: transform 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
}

/* Focus states for accessibility */
a:focus, button:focus {
    outline: 2px solid #1a8917;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .site-header, .site-footer, .main-navigation, .sidebar {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}
