@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;500;600;700&display=swap");

:root {
    --brand: #ff6b35;
    --brand-dark: #e85b27;
    --brand-soft: #ffd7c6;
    --ink: #0f172a;
    --ink-soft: #1f2937;
    --muted: #5f6b7a;
    --surface: #ffffff;
    --surface-2: #f8f5f1;
    --surface-3: #fff2ec;
    --border: #e6e2de;
    --shadow-sm: 0 6px 20px rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 28px;
    --max-width: 1200px;
    --font-sans: "Sora", "Trebuchet MS", "Lucida Grande", sans-serif;
    --font-serif: "Source Serif 4", Georgia, serif;
}

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

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

body {
    font-family: var(--font-sans);
    color: var(--ink);
    line-height: 1.7;
    background: var(--surface);
    min-height: 100vh;
}

body.homepage {
    background-color: var(--surface);
    background-image:
        radial-gradient(circle at 10% 10%, rgba(255, 107, 53, 0.12), transparent 42%),
        radial-gradient(circle at 90% 0%, rgba(14, 165, 233, 0.12), transparent 40%),
        linear-gradient(180deg, #fffaf7 0%, #ffffff 45%, #f8f5f1 100%);
}

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

a {
    color: var(--brand-dark);
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

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

.skip-link {
    position: absolute;
    left: -999px;
    top: 0.5rem;
    background: var(--brand);
    color: #ffffff;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    z-index: 999;
}

.skip-link:focus {
    left: 1rem;
}

header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: relative;
}

body.homepage header {
    background: rgba(255, 255, 255, 0.92);
}

header nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 120px;
    width: auto;
}

.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
}

.nav-menu a.active {
    color: var(--ink);
}

.lang-switcher {
    display: flex;
    gap: 0.4rem;
    background: var(--surface-2);
    padding: 0.3rem;
    border-radius: 999px;
}

.lang-switcher a {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.lang-switcher a.active {
    background: var(--brand);
    color: #ffffff;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

h1,
h2,
h3 {
    font-family: var(--font-sans);
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

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

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    color: var(--ink-soft);
    margin-bottom: 1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.2);
}

.button.primary:hover {
    transform: translateY(-1px);
}

.button.ghost {
    border-color: var(--border);
    color: var(--ink);
    background: #ffffff;
}

.text-link {
    font-weight: 600;
    color: var(--brand-dark);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 107, 53, 0.15);
    color: var(--brand-dark);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.section {
    margin-top: 3.5rem;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--brand-dark);
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.category {
    display: inline-flex;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--brand-dark);
    font-size: 0.75rem;
    font-weight: 600;
}

.article-card,
.list-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-card:hover,
.list-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 107, 53, 0.45);
    box-shadow: var(--shadow-sm);
}

.card-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(14, 165, 233, 0.12));
    aspect-ratio: 3 / 2;
}

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

.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-body h2,
.card-body h3 {
    margin: 0;
}

.homepage .hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    align-items: center;
    padding-bottom: 1.5rem;
}

.hero-kicker {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--brand-dark);
    margin-bottom: 0.75rem;
}

.hero-lede {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.trust-item {
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.hero-feature .article-card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.featured-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.latest-list {
    display: grid;
    gap: 1rem;
}

.list-card a {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    color: inherit;
}

.list-thumb {
    width: 150px;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
}

.list-body h3 {
    font-size: 1rem;
}

.list-excerpt {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topic-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.topic-chip {
    padding: 0.45rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    background: #ffffff;
    transition: all 0.2s ease;
}

.topic-chip:hover {
    border-color: rgba(255, 107, 53, 0.5);
    color: var(--ink);
}

.topic-chip.active {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.author-highlight {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.author-media {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.author-media img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
}

.author-role {
    font-weight: 600;
    color: var(--brand-dark);
}

.author-list {
    list-style: none;
    margin-top: 1rem;
    display: grid;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.author-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, #fff3eb 0%, #ffffff 65%);
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.cta p {
    margin: 0.5rem 0 0;
    color: var(--muted);
}

footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
}

footer a {
    color: var(--muted);
}

footer a:hover {
    color: var(--brand);
}

article {
    max-width: 860px;
    margin: 0 auto;
}

.breadcrumbs {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

.breadcrumbs a {
    color: var(--muted);
}

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

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.article-meta a {
    color: var(--muted);
    font-weight: 600;
}

.article-meta a:hover {
    color: var(--brand-dark);
}

.article-meta img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.featured-image {
    margin: 2.5rem 0;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.toc {
    background: var(--surface-2);
    padding: 1.5rem 2rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    border-left: 4px solid var(--brand);
}

.toc strong {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin: 0.5rem 0;
}

.toc a {
    color: var(--ink);
}

.article-content {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.85;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--ink);
}

.article-content ul,
.article-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.article-content li {
    margin: 0.5rem 0;
}

.article-content strong {
    font-weight: 600;
    color: var(--ink);
}

.article-content code {
    background: var(--surface-2);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "Courier New", monospace;
}

.article-content pre {
    background: #111827;
    color: #ffffff;
    padding: 1.5rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

.expert-note {
    background: #fff5f0;
    border-left: 4px solid var(--brand);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius);
}

.expert-note strong {
    display: block;
    color: var(--brand-dark);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.faq-section {
    background: var(--surface-2);
    padding: 2.5rem;
    border-radius: var(--radius);
    margin: 3rem 0;
}

.faq-section h2 {
    margin-top: 0;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--surface-2);
    border-radius: var(--radius);
    margin: 3rem 0;
}

.author-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.author-box p {
    margin: 0 0 0.75rem 0;
    color: var(--muted);
}

.author-box a {
    color: var(--brand-dark);
    font-weight: 600;
}

.author-profile {
    max-width: 800px;
    margin: 0 auto;
}

.author-profile-header {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.author-profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.author-title {
    font-size: 1.25rem;
    color: var(--brand-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-experience {
    color: var(--muted);
    font-size: 1rem;
}

.author-bio h2 {
    margin-top: 2.5rem;
}

.author-bio h3 {
    margin-top: 2rem;
}

.author-bio ul {
    margin: 1rem 0 1rem 2rem;
}

.author-bio li {
    margin: 0.75rem 0;
}

.author-articles {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.related-articles {
    margin: 4rem 0 3rem;
}

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

.related-card {
    display: block;
    padding: 1.5rem;
    background: var(--surface-2);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.related-card:hover {
    background: #ffffff;
    border-left-color: var(--brand);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.related-card span {
    font-weight: 600;
}

a[data-autolink="1"] {
    text-decoration-style: dotted;
    text-decoration-color: var(--brand);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: rise 0.8s ease both;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

@media (max-width: 1100px) {
    .homepage .hero {
        grid-template-columns: 1fr;
    }

    .hero-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-layout {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .author-highlight {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .nav-menu {
        order: 3;
        width: 100%;
        flex-wrap: wrap;
    }

    .lang-switcher {
        order: 2;
    }

    main {
        padding: 2.5rem 1.5rem 3.5rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-trust {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .author-highlight {
        text-align: center;
    }

    .author-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .author-profile-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .author-profile-photo {
        width: 120px;
        height: 120px;
    }

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

@media (max-width: 520px) {
    main {
        padding: 2rem 1rem 3rem;
    }

    .list-card a {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-thumb {
        width: 100%;
    }

    .lang-switcher a {
        padding: 0.35rem 0.7rem;
    }
}
