/* ===================================
   CSS Reset and Base Styles
   =================================== */

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

/* CSS Variables */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2563eb;
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --max-width: 1200px;
    --article-width: 800px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Typography */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   Layout Components
   =================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.main-article {
    max-width: var(--article-width);
}

/* ===================================
   Header and Navigation
   =================================== */

.site-header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar {
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.hamburger {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.menu-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===================================
   Article Styles
   =================================== */

.article-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.article-category {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.article-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.author-info {
    display: flex;
    gap: 0.5rem;
}

.author-label {
    font-weight: 500;
}

.publish-date {
    position: relative;
}

.publish-date::before {
    content: '•';
    position: absolute;
    left: -1rem;
}

/* Featured Image */
.featured-image {
    margin: 2rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.featured-image img {
    width: 100%;
    object-fit: cover;
    min-height: 300px;
    background: var(--bg-light);
}

.image-caption {
    padding: 0.75rem;
    background: var(--bg-light);
    color: var(--text-light);
    font-size: 0.875rem;
    text-align: center;
    font-style: italic;
}

/* Article Content */
.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
}

.lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-weight: 400;
}

.key-points {
    background: var(--bg-light);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    margin: 2rem 0;
    list-style-position: inside;
}

.key-points li {
    margin-bottom: 1rem;
}

.key-points li:last-child {
    margin-bottom: 0;
}

/* Blockquote */
blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-left: 4px solid var(--secondary-color);
    font-style: italic;
}

blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: normal;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tool-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.tool-card p {
    margin-bottom: 0;
    color: var(--text-light);
}

/* Strategy List */
.strategy-list {
    counter-reset: strategy;
    list-style: none;
    margin: 2rem 0;
}

.strategy-list li {
    counter-increment: strategy;
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1rem;
}

.strategy-list li::before {
    content: counter(strategy);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Transcript Section */
.transcript-section {
    margin: 3rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.transcript-section summary {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.transcript-section summary::-webkit-details-marker {
    display: none;
}

.transcript-section summary h2 {
    margin: 0;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.transcript-section[open] .toggle-icon {
    transform: rotate(180deg);
}

.transcript-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.podcast-cta {
    margin-top: 1.5rem;
}

.podcast-note {
    padding: 1.5rem;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.podcast-note p {
    margin: 0;
    color: #92400e;
}

/* ===================================
   Related Articles Section
   =================================== */

.related-articles {
    margin: 4rem 0;
    padding: 3rem 0;
    border-top: 2px solid var(--border-color);
}

.related-articles h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.article-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.article-image {
    position: relative;
    padding-bottom: 60%;
    overflow: hidden;
    background: var(--bg-light);
}

.article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-info {
    padding: 1.5rem;
}

.article-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.article-info p {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===================================
   Footer
   =================================== */

.site-footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-note {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: #ffffff;
    color: #000000;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    margin-top: 0.5rem;
}

.footer-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
    text-decoration: none;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   Mobile Responsive Design
   =================================== */

@media (max-width: 768px) {

    /* Typography adjustments */
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 0.5rem 0;
    }

    .menu-toggle {
        display: flex;
    }

    /* Article Meta */
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .publish-date::before {
        display: none;
    }

    /* Featured Image */
    .featured-image img {
        min-height: 200px;
    }

    /* Tools Grid */
    .tools-grid {
        grid-template-columns: 1fr;
    }

    /* Article Grid */
    .article-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Padding adjustments */
    .container {
        padding: 0 15px;
    }

    .article-header {
        padding: 2rem 0 1.5rem;
    }

    .site-footer {
        padding: 2rem 0 1rem;
    }
}

@media (max-width: 480px) {

    /* Further mobile optimizations */
    h1 {
        font-size: 1.75rem;
    }

    .article-category {
        font-size: 0.75rem;
    }

    .key-points {
        padding: 1rem;
    }

    .strategy-list li {
        padding-left: 2.5rem;
    }

    .tool-card {
        padding: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {

    .site-header,
    .site-footer,
    .menu-toggle,
    .related-articles,
    .social-links {
        display: none;
    }

    .article-content {
        font-size: 12pt;
    }

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

    .transcript-section {
        display: block;
    }
}