/* neurokirurgi.fi — v2.0 redesign
   Dark-mode-first. Scandinavian minimal. Typography-driven.
   No frameworks. No bloat. */

/* ========== RESET & BASE ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0e17;
    --bg-elevated: #111827;
    --bg-card: #151c2c;
    --border: rgba(255,255,255,0.06);
    --text: #d1d5db;
    --text-muted: #8892a4;
    --text-heading: #f1f3f7;
    --accent: #4dc9f6;
    --accent-hover: #7dd8f8;
    --accent-subtle: rgba(77,201,246,0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --max-w: 860px;
    --max-w-narrow: 720px;
    --radius: 6px;
    --transition: 0.2s ease;
}

/* Light mode overrides */
body.light {
    --bg: #fafbfc;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --border: rgba(0,0,0,0.08);
    --text: #374151;
    --text-muted: #6b7280;
    --text-heading: #111827;
    --accent: #0c7fb5;
    --accent-hover: #0a6999;
    --accent-subtle: rgba(12,127,181,0.06);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

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

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

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

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

/* ========== LAYOUT ========== */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ========== NAVIGATION ========== */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.light .site-nav {
    background: rgba(250,251,252,0.92);
}

/* When dark (default), use slightly transparent bg */
body:not(.light) .site-nav {
    background: rgba(10,14,23,0.92);
}

.site-nav__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 16px;
}

.site-nav__brand {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-heading);
    text-decoration: none;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.site-nav__brand:hover {
    color: var(--accent);
}

.site-nav__links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav__links a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    text-decoration: none;
}

.site-nav__links a:hover,
.site-nav__links a.active {
    color: var(--text-heading);
    background: var(--accent-subtle);
}

.site-nav__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-toggle {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all var(--transition);
}

.lang-toggle:hover {
    color: var(--text-heading);
    border-color: var(--text-muted);
}

.lang-toggle.active {
    color: var(--text-heading);
    border-color: var(--accent);
    background: var(--accent-subtle);
}

.theme-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all var(--transition);
    padding: 0;
    line-height: 1;
}

.theme-btn:hover {
    color: var(--text-heading);
    border-color: var(--text-muted);
}

/* Mobile hamburger (hidden by default) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

/* ========== CTA BUTTON ========== */
.btn-cta {
    display: inline-block;
    background: var(--accent);
    color: #0a0e17;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
    white-space: nowrap;
}

.btn-cta:hover {
    background: var(--accent-hover);
    color: #0a0e17;
    transform: translateY(-1px);
}

.btn-cta--large {
    font-size: 16px;
    padding: 14px 32px;
    border-radius: 8px;
}

/* ========== HERO ========== */
.hero {
    padding: 80px 0 64px;
    text-align: center;
}

.hero__photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 28px;
    border: 3px solid var(--border);
}

.hero__name {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-heading);
    letter-spacing: -1px;
    margin-bottom: 8px;
    line-height: 1.15;
}

.hero__title {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ========== PAGE HEADER (blog, etc.) ========== */
.page-header {
    padding: 56px 0 40px;
    text-align: center;
}

.page-header__title {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text-heading);
    letter-spacing: -0.8px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.page-header__subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Breadcrumb */
.breadcrumb {
    text-align: center;
    margin-bottom: 12px;
    font-size: 14px;
}

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

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

.breadcrumb__sep {
    color: var(--text-muted);
    opacity: 0.4;
    margin: 0 8px;
}

/* ========== INTRO / CONTENT SECTIONS ========== */
.intro {
    padding-bottom: 48px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 48px;
}

.intro p {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 1.2em;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.intro p:last-child {
    margin-bottom: 0;
}

.section {
    padding: 48px 0;
    border-bottom: 1px solid var(--border);
}

.section:last-of-type {
    border-bottom: none;
}

.section__title {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-heading);
    margin-bottom: 28px;
    letter-spacing: -0.3px;
}

/* ========== CONDITION CARDS ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
}

.card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.card__list {
    list-style: none;
}

.card__list li {
    padding: 4px 0 4px 18px;
    position: relative;
    color: var(--text);
    font-size: 0.95rem;
}

.card__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
}

/* ========== SYMPTOMS LIST ========== */
.symptom-list {
    list-style: none;
    max-width: 680px;
}

.symptom-list li {
    padding: 10px 0 10px 24px;
    position: relative;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-size: 0.98rem;
}

.symptom-list li:last-child {
    border-bottom: none;
}

.symptom-list li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    color: var(--accent);
    opacity: 0.7;
}

/* ========== INFO BOX ========== */
.info-box {
    background: var(--accent-subtle);
    border-left: 3px solid var(--accent);
    padding: 24px 28px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 32px 0;
}

.info-box p {
    color: var(--text);
    margin: 0;
    font-size: 0.95rem;
}

.info-box strong {
    color: var(--text-heading);
}

/* ========== CTA SECTION ========== */
.cta-section {
    text-align: center;
    padding: 64px 0;
}

.cta-section__title {
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--text-heading);
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

/* ========== BLOG LIST ========== */
.blog-list {
    padding: 16px 0 48px;
}

.blog-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-bottom: 16px;
    transition: border-color var(--transition);
    text-decoration: none;
}

.blog-card:hover {
    border-color: var(--accent);
}

.blog-card__meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.blog-card__tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    background: var(--accent-subtle);
    padding: 2px 10px;
    border-radius: 20px;
}

.blog-card__title {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 8px;
    line-height: 1.35;
}

.blog-card__excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.blog-card__read-more {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
}

/* ========== ARTICLE ========== */
.article {
    padding: 16px 0 48px;
}

.article__body {
    max-width: var(--max-w-narrow);
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.85;
}

.article__body p {
    margin-bottom: 1.5em;
    color: var(--text);
}

.article__body p:last-child {
    margin-bottom: 0;
}

.article__body figure {
    margin: 2.5rem 0;
    text-align: center;
}

.article__body figure img {
    max-width: 500px;
    margin: 0 auto;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.article__body figcaption {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.article__body .closing-line {
    font-weight: 500;
    font-style: italic;
    color: var(--accent);
}

.article-nav {
    max-width: var(--max-w-narrow);
    margin: 0 auto 32px;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

/* ========== FOOTER ========== */
.site-footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 32px 24px;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 32px;
}

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

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

.site-footer p {
    margin-bottom: 4px;
}

.site-footer p:last-child {
    margin-bottom: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .site-nav__inner {
        height: auto;
        flex-wrap: wrap;
        padding: 12px 0;
        gap: 8px;
    }

    .site-nav__links {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 4px;
        display: none;
    }

    .site-nav__links.open {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero {
        padding: 56px 0 40px;
    }

    .hero__name {
        font-size: 2rem;
    }

    .hero__photo {
        width: 110px;
        height: 110px;
    }

    .page-header {
        padding: 40px 0 28px;
    }

    .page-header__title {
        font-size: 1.7rem;
    }

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

    .section {
        padding: 36px 0;
    }

    .intro p {
        font-size: 1rem;
    }

    .article__body {
        font-size: 1rem;
    }

    .article__body figure img {
        max-width: 100%;
    }

    .blog-card {
        padding: 20px 24px;
    }

    .btn-cta--large {
        padding: 12px 24px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .hero__name {
        font-size: 1.7rem;
    }

    .page-header__title {
        font-size: 1.4rem;
    }

    .site-nav__right {
        gap: 6px;
    }
}

/* ========== ENTRANCE ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero entrance */
.hero__photo {
    animation: fadeIn 0.8s ease both;
}

.hero__name {
    animation: fadeInUp 0.6s ease 0.15s both;
}

.hero__title {
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* Intro paragraphs stagger */
.intro p:nth-child(1) { animation: fadeInUp 0.5s ease 0.1s both; }
.intro p:nth-child(2) { animation: fadeInUp 0.5s ease 0.2s both; }
.intro p:nth-child(3) { animation: fadeInUp 0.5s ease 0.3s both; }

/* Cards stagger */
.card:nth-child(1) { animation: fadeInUp 0.5s ease 0.05s both; }
.card:nth-child(2) { animation: fadeInUp 0.5s ease 0.12s both; }
.card:nth-child(3) { animation: fadeInUp 0.5s ease 0.19s both; }
.card:nth-child(4) { animation: fadeInUp 0.5s ease 0.26s both; }

/* Card subtle hover lift */
.card {
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    border-color: rgba(77,201,246,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

body.light .card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* CTA section entrance */
.cta-section {
    animation: fadeInUp 0.6s ease 0.1s both;
}

/* Symptom list items stagger */
.symptom-list li:nth-child(1) { animation: fadeInUp 0.4s ease 0.05s both; }
.symptom-list li:nth-child(2) { animation: fadeInUp 0.4s ease 0.1s both; }
.symptom-list li:nth-child(3) { animation: fadeInUp 0.4s ease 0.15s both; }
.symptom-list li:nth-child(4) { animation: fadeInUp 0.4s ease 0.2s both; }
.symptom-list li:nth-child(5) { animation: fadeInUp 0.4s ease 0.25s both; }
.symptom-list li:nth-child(6) { animation: fadeInUp 0.4s ease 0.3s both; }

/* Info box entrance */
.info-box {
    animation: fadeInUp 0.5s ease 0.2s both;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }
}
