/* Chewy Talks - Main Stylesheet */

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables */
:root {
    --text-primary: #1a1a1a;
    --text-secondary: #5a5a5a;
    --text-muted: #8a8a8a;
    --bg-primary: #fafafa;
    --bg-card: #fff;
    --accent: #2d5a47;
    --accent-hover: #1e3d30;
    --border: #e5e5e5;
    --font-serif: 'Newsreader', Georgia, serif;
    --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Base */
html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
}

/* Container */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 24px;
}

.container--narrow {
    max-width: 680px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 400;
    letter-spacing: -0.02em;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* ==================== */
/* HEADER               */
/* ==================== */

.site-header {
    margin-bottom: 60px;
}

.logo {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

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

.logo a:hover {
    color: var(--accent);
}

.site-title {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.site-tagline {
    font-size: 20px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Navigation */
.main-nav {
    margin: 40px 0;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.main-nav a {
    font-family: var(--font-sans);
    font-size: 15px;
    color: var(--text-secondary);
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
}

/* ==================== */
/* SECTIONS             */
/* ==================== */

.section {
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ==================== */
/* FEATURED ESSAY       */
/* ==================== */

.featured {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 32px;
    margin-bottom: 40px;
}

.featured-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.featured .essay-title {
    font-size: 26px;
    line-height: 1.3;
}

.featured .essay-excerpt {
    margin-top: 12px;
}

.featured .essay-meta {
    margin-top: 12px;
}

/* ==================== */
/* ESSAY LIST           */
/* ==================== */

.essay-list {
    list-style: none;
}

.essay-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.essay-item:first-child {
    border-top: 1px solid var(--border);
}

.essay-title {
    font-size: 20px;
    margin-bottom: 6px;
}

.essay-title a {
    color: var(--text-primary);
}

.essay-title a:hover {
    color: var(--accent);
}

.essay-meta {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-muted);
}

.essay-excerpt {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==================== */
/* VIDEO GRID           */
/* ==================== */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.video-card {
    color: inherit;
}

.video-card:hover .video-title {
    color: var(--accent);
}

.video-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #ddd;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.video-card:hover .video-thumb::after {
    opacity: 1;
    background: #fff;
}

.video-title {
    font-size: 16px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.video-duration {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==================== */
/* ABOUT SECTION        */
/* ==================== */

.about-brief {
    font-size: 17px;
    line-height: 1.8;
}

.about-brief a {
    border-bottom: 1px solid var(--accent);
}

/* ==================== */
/* ARTICLE / ESSAY PAGE */
/* ==================== */

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

.back-link {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-muted);
    display: inline-block;
    margin-bottom: 32px;
}

.back-link:hover {
    color: var(--accent);
}

.article-title {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.article-meta {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-muted);
}

/* Article Content */
.article-content {
    font-size: 19px;
    line-height: 1.75;
}

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

.article-content h2 {
    font-size: 26px;
    margin-top: 48px;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

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

.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content strong {
    font-weight: 600;
}

.article-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content code {
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.9em;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
}

.article-content pre {
    background: #f5f5f5;
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 4px;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 32px 0;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 48px 0;
}

/* Pull Quote */
.pull-quote {
    font-size: 24px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 48px 0;
    padding: 0 24px;
    border-left: 3px solid var(--accent);
    font-style: italic;
}

/* ==================== */
/* VIDEO PAGE           */
/* ==================== */

.channel-links {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.channel-links a {
    color: var(--accent);
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin-bottom: 32px;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-description {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ==================== */
/* FOOTER               */
/* ==================== */

.site-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.subscribe-cta {
    margin-bottom: 24px;
}

.subscribe-cta a {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid var(--accent);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.subscribe-cta a:hover {
    background: var(--accent);
    color: white;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-icons a {
    color: var(--text-muted);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons a:hover {
    color: var(--accent);
}

.social-icons svg {
    width: 22px;
    height: 22px;
}

.copyright {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
}

/* Share Links */
.share-links {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-family: var(--font-sans);
    font-size: 14px;
}

.share-label {
    color: var(--text-muted);
    margin-right: 12px;
}

.share-links a {
    color: var(--text-secondary);
    margin-right: 16px;
    text-decoration: none;
}

.share-links a:hover {
    color: var(--accent);
}

/* Article Footer Nav */
.article-footer {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-size: 14px;
    gap: 20px;
}

.footer-nav a {
    color: var(--text-secondary);
}

.footer-nav a:hover {
    color: var(--accent);
}

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

.next-essay .label {
    color: var(--text-muted);
    margin-bottom: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================== */
/* PAGES                */
/* ==================== */

.page-content {
    font-size: 17px;
    line-height: 1.8;
}

.page-content p {
    margin-bottom: 20px;
}

.page-content h2 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 16px;
}

.page-content a {
    border-bottom: 1px solid var(--accent);
}

/* ==================== */
/* RESPONSIVE           */
/* ==================== */

@media (max-width: 600px) {
    html {
        font-size: 16px;
    }
    
    .container {
        padding: 40px 20px;
    }
    
    .site-title {
        font-size: 32px;
    }
    
    .site-tagline {
        font-size: 18px;
    }
    
    .main-nav {
        gap: 20px;
    }
    
    .featured {
        padding: 24px;
    }
    
    .featured .essay-title {
        font-size: 22px;
    }
    
    .article-title {
        font-size: 32px;
    }
    
    .article-content {
        font-size: 17px;
    }
    
    .article-content h2 {
        font-size: 22px;
    }
    
    .pull-quote {
        font-size: 20px;
        padding: 0 16px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-nav {
        flex-direction: column;
    }
    
    .next-essay {
        text-align: left;
        margin-top: 16px;
    }
}

/* Profile Photo */
.profile-photo {
    float: right;
    width: 280px;
    margin: 0 0 24px 32px;
    border-radius: 4px;
    shape-outside: margin-box;
}

@media (max-width: 600px) {
    .profile-photo {
        float: none;
        display: block;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 24px auto;
    }
}
