:root {
    /* Base Colors - Refined Light Theme */
    --bg-primary: #FBF9F4;
    /* Warm Creamy White */
    --bg-secondary: #F5F3ED;
    --bg-card: #FFFFFF;
    --text-primary: #111111;
    --text-secondary: #666666;
    --accent-blue: #E3F2FD;
    --accent-pink: #FCE4EC;
    --accent-yellow: #FFF9C4;
    --border-color: #E8E6E1;
    --btn-bg: #111111;
    --btn-text: #FFFFFF;

    /* Transitions */
    --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;

    /* Layout */
    --container-max-width: 1200px;
    --border-radius-lg: 40px;
    /* 2.5rem */
    --border-radius-md: 20px;
    --serif-font: 'Georgia', serif;
    --sans-font: 'Inter', 'Open Sans', sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #111111;
    /* Rich Black/Gray */
    --bg-secondary: #1A1A1A;
    --bg-card: #1E1E1E;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --accent-blue: #1E3A5F;
    --accent-pink: #4A2B3D;
    --accent-yellow: #4D4D2E;
    --border-color: #2A2A2A;
    --btn-bg: #FFFFFF;
    --btn-text: #111111;
}

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

body {
    font-family: var(--sans-font);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--theme-transition);
}

h1,
h2,
h3,
h4 {
    font-family: var(--serif-font);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

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

/* Header */
header {
    margin-top: 1.5rem;
    position: sticky;
    top: 1rem;
    z-index: 1000;
}

.nav-pill {
    background: rgba(var(--bg-card), 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 60px;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.logo-img {
    height: 35px;
    width: auto;
    display: block;
    transition: var(--theme-transition);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.btn-pill {
    background: var(--btn-bg);
    color: var(--btn-text);
    padding: 0.7rem 1.4rem;
    border-radius: 60px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.btn-pill:hover {
    transform: scale(1.02);
}

/* Page Hero - Original/Simple */
.page-intro {
    text-align: center;
    max-width: 850px;
    margin: 4rem auto 4rem;
    padding: 0 1rem;
}

/* New Hero Layout - Two Column */
.hero-section {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin: 2rem 0 4rem;
    border: 1px solid var(--border-color);
}

.hero-img-wrap {
    aspect-ratio: 1 / 1;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Mission Section */
.mission-section {
    text-align: center;
    max-width: 900px;
    margin: 6rem auto;
    padding: 0 1.5rem;
}

.mission-section h2 {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 700;
}

.mission-section p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 750px;
    margin: 0 auto;
}

/* Article Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.modern-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.card-img-container {
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

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

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
}

.card-tag {
    align-self: flex-start;
    background: var(--bg-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.card-title {
    font-family: var(--serif-font);
    font-size: 1.4rem;
    line-height: 1.25;
    color: var(--text-primary);
    margin: 0;
    min-height: 3.4rem;
    /* Ensures alignment for 2-line titles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-arrow {
    color: var(--text-secondary);
    font-size: 0.75rem;
    /* Tiny text */
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease;
}

.modern-card:hover .card-arrow {
    transform: translateX(5px);
}

/* Panels (Form Alternatives) */
.panel {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: clamp(3rem, 10vw, 5rem) 2rem;
    text-align: center;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.panel h2 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.panel p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Blog Detail Page */
.article-header {
    text-align: center;
    max-width: 800px;
    margin: 4rem auto 3rem;
}

.article-meta {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: block;
}

.article-hero {
    width: 100%;
    border-radius: var(--border-radius-lg);
    margin-bottom: 4rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
}

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

.article-content h3 {
    font-size: 2rem;
    margin: 3.5rem 0 1.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-blue);
    padding: 1rem 0 1rem 2rem;
    margin: 3rem 0;
    font-style: italic;
    font-family: var(--serif-font);
    font-size: 1.4rem;
    color: var(--text-secondary);
}

/* Feature Box */
.feature-box {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin: 5rem 0;
}

.feature-img-wrap {
    height: 500px;
    border-radius: calc(var(--border-radius-lg) - 10px);
    overflow: hidden;
}

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

.feature-content {
    padding-right: 3rem;
}

.feature-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

/* Footer Refined */
footer {
    padding: 4rem 0 2rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 5rem;
    flex-wrap: nowrap;
    /* Keep on same level */
}

.footer-brand {
    flex: 1.5;
}

.footer-col {
    flex: 1;
}

.footer-brand h2 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

.footer-col h4 {
    font-family: var(--sans-font);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col i {
    width: 24px;
    text-align: center;
    color: var(--text-secondary);
    display: inline-block;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

@media (max-width: 1024px) {
    .nav-pill {
        padding: 0.8rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .hero-section {
        grid-template-columns: 1fr;
        padding: 2.5rem;
        text-align: center;
        gap: 2.5rem;
    }

    .hero-img-wrap {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .feature-box {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .feature-content {
        padding-right: 0;
        text-align: center;
    }

    .footer-grid {
        flex-wrap: wrap;
        gap: 3rem;
    }

    .footer-brand {
        flex: 0 0 100%;
        text-align: center;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    header {
        top: 0.5rem;
        position: static;
        /* Let it flow on mobile if it gets too big */
    }

    .nav-pill {
        flex-direction: column;
        gap: 1.25rem;
        border-radius: 20px;
        padding: 1.25rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .logo-img {
        height: 28px;
    }

    .nav-links {
        font-size: 0.85rem;
        gap: 1.5rem;
        width: 100%;
        justify-content: center;
    }

    .nav-right {
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .btn-pill {
        width: auto;
        padding: 0.7rem 2rem;
    }

    .grid {
        gap: 1.5rem;
    }

    .footer-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 3rem;
    }

    .footer-col li {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-links {
        display: none;
        /* Hide links on very small screens for better UX */
    }

    .hero-section {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .panel {
        padding: 3rem 1.5rem;
        border-radius: 20px;
    }
}