/*
Theme Name: Carter Kegelman
Description: ADA compliant gray monotone WordPress theme for Carter Kegelman's blog
Author: Carter Kegelman
Version: 1.0
License: GPL v2 or later
*/

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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2d2d2d;
    background-color: #f8f8f8;
    font-size: 18px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #333;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Header */
header {
    background-color: #e8e8e8;
    border-bottom: 3px solid #c0c0c0;
    padding: 2rem 0;
    position: relative;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #1a1a1a;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.site-title:hover,
.site-title:focus {
    color: #4a4a4a;
    outline: 2px solid #666;
    outline-offset: 2px;
}

.site-description {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: #d0d0d0;
    border: 2px solid #b8b8b8;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover,
.social-link:focus {
    background-color: #333;
    border-color: #333;
    transform: translateY(-2px);
    outline: 2px solid #666;
    outline-offset: 2px;
}

.social-link:hover .social-icon,
.social-link:focus .social-icon {
    color: #fff;
}

.social-icon {
    font-size: 1.2rem;
    color: #333;
    transition: color 0.3s ease;
}

/* Navigation */
nav {
    background-color: #d5d5d5;
    border-bottom: 2px solid #b8b8b8;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.main-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

.main-menu li {
    margin-right: 2rem;
}

.main-menu a {
    display: block;
    padding: 1rem 0;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    border-bottom: 3px solid transparent;
}

.main-menu a:hover,
.main-menu a:focus {
    color: #000;
    border-bottom-color: #666;
    outline: none;
}

.main-menu a.current-menu-item {
    color: #000;
    border-bottom-color: #333;
}

/* Main Content */
.main-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.content-area {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Articles */
article {
    padding: 2.5rem;
    border-bottom: 1px solid #eee;
}

article:last-child {
    border-bottom: none;
}

.article-header {
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-title a {
    color: inherit;
    text-decoration: none;
}

.article-title a:hover,
.article-title a:focus {
    color: #4a4a4a;
    text-decoration: underline;
    outline: 2px solid #666;
    outline-offset: 2px;
}

.article-meta {
    color: #666;
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.article-content {
    line-height: 1.8;
    color: #333;
}

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

.article-content h2,
.article-content h3,
.article-content h4 {
    color: #1a1a1a;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.article-content h2 {
    font-size: 1.5rem;
}

.article-content h3 {
    font-size: 1.3rem;
}

.article-content blockquote {
    border-left: 4px solid #bbb;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    border: 2px solid #333;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.read-more:hover,
.read-more:focus {
    background-color: #333;
    color: #fff;
    outline: 2px solid #666;
    outline-offset: 2px;
}

/* Sidebar */
.sidebar {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 2rem;
    height: fit-content;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget {
    margin-bottom: 2.5rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ddd;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
}

.widget li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.widget a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover,
.widget a:focus {
    color: #000;
    text-decoration: underline;
    outline: 2px solid #666;
    outline-offset: 2px;
}

/* Contact Info Styles */
.contact-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.social-links-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links-sidebar a {
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

/* Footer */
footer {
    background-color: #e8e8e8;
    border-top: 3px solid #c0c0c0;
    padding: 3rem 0 2rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-content {
    color: #666;
    line-height: 1.6;
}

.footer-content a {
    color: #333;
    text-decoration: none;
}

.footer-content a:hover,
.footer-content a:focus {
    color: #000;
    text-decoration: underline;
    outline: 2px solid #666;
    outline-offset: 2px;
}

/* Footer Layout */
.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-section h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #ddd;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.nav-previous,
.nav-next {
    flex: 1;
}

.nav-next {
    text-align: right;
}

.post-navigation a {
    color: #333;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    display: inline-block;
    transition: all 0.3s ease;
}

.post-navigation a:hover,
.post-navigation a:focus {
    background-color: #333;
    color: #fff;
    outline: 2px solid #666;
    outline-offset: 2px;
}

/* Article Tags */
.article-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.article-tags h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #666;
}

.article-tags ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-tags li {
    background-color: #f0f0f0;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.article-tags a {
    color: #333;
    text-decoration: none;
}

.article-tags a:hover,
.article-tags a:focus {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    margin: 2rem 0;
    text-align: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}

.pagination a:hover,
.pagination a:focus {
    background-color: #333;
    color: #fff;
}

.pagination .current {
    background-color: #333;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    .site-title {
        font-size: 2rem;
    }

    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }

    .main-container {
        grid-template-columns: 1fr;
        margin: 2rem auto;
        gap: 2rem;
    }

    .main-menu {
        flex-direction: column;
    }

    .main-menu li {
        margin-right: 0;
        margin-bottom: 0;
    }

    .main-menu a {
        padding: 0.8rem 0;
        border-bottom: 1px solid #bbb;
    }

    article {
        padding: 1.5rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    .sidebar {
        padding: 1.5rem;
    }

    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-next {
        text-align: left;
    }
}

/* Focus Styles for Better Accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #666;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    body {
        background-color: #fff;
        color: #000;
    }

    .content-area,
    .sidebar {
        border: 2px solid #000;
    }

    .read-more {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Screen reader only styles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}