:root {
    color-scheme: light;
    --navy: #102341;
    --navy-deep: #0b1930;
    --blue: #2459a6;
    --blue-soft: #eaf1fb;
    --green: #7cb533;
    --ink: #263449;
    --muted: #5d6b7e;
    --page: #f4f7fb;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 12px 32px rgb(16 35 65 / 8%);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

header {
    background: var(--navy);
    color: var(--white);
}

.navbar {
    width: min(1120px, 100%);
    min-height: 82px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.project.logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    display: inline-block;
    padding: 9px 13px;
    border-radius: 8px;
    color: #e6edf7;
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease;
}

.about-link {
    display: inline-block;
    padding: 9px 13px;
    border-radius: 8px;
    color: #e6edf7;
    font-size: 0.94rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.about-link:hover,
.about-link:focus-visible {
    background: rgb(255 255 255 / 12%);
    color: var(--white);
}

a:focus-visible {
    outline: 3px solid #a8d56e;
    outline-offset: 3px;
}

body > h1 {
    margin: 0;
    padding: 52px 24px;
    background: linear-gradient(120deg, var(--navy-deep), #1c4778);
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.2;
    text-align: center;
}

section {
    width: min(1120px, calc(100% - 48px));
    margin: 32px auto;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow);
}

section h2 {
    margin: 0 0 16px;
    color: var(--navy);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    letter-spacing: -0.025em;
    line-height: 1.3;
}

section h2:not(:first-child) {
    margin-top: 30px;
}

section h3 {
    margin: 18px 18px 8px;
    color: var(--navy);
    font-size: 1.12rem;
    line-height: 1.4;
}

section p {
    margin: 0 0 16px;
    color: var(--muted);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
    gap: 22px;
    margin-top: 24px;
}

.card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 6px 18px rgb(16 35 65 / 6%);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgb(16 35 65 / 12%);
}

.card-image {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.card p {
    margin: 0 18px 20px;
    font-size: 0.95rem;
}

.challenge-list {
    margin: 26px 0 0;
    padding: 20px 24px 20px 44px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--ink);
}

.challenge-list li + li {
    margin-top: 8px;
}

.practical-steps {
    margin: 20px 0 0;
    padding: 0 0 0 24px;
    color: var(--muted);
}

.practical-steps li + li {
    margin-top: 10px;
}

.useful-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 14px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.useful-links a {
    display: flex;
    min-height: 64px;
    align-items: center;
    padding: 14px 17px;
    border: 1px solid #d7e2f0;
    border-radius: 10px;
    background: #f8faff;
    color: var(--blue);
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none;
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.useful-links a:hover,
.useful-links a:focus-visible {
    transform: translateY(-2px);
    border-color: var(--blue);
    background: var(--blue-soft);
}

footer {
    margin-top: 48px;
    padding: 24px;
    background: var(--navy-deep);
    color: #d5deeb;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.92rem;
}

.about-hero {
    padding: clamp(36px, 7vw, 76px) 24px;
    background: linear-gradient(120deg, var(--navy-deep), #1c4778);
    color: var(--white);
}

.about-hero-inner {
    display: grid;
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 6vw, 64px);
    width: min(1000px, 100%);
    margin: 0 auto;
}

.about-portrait {
    display: block;
    width: 100%;
    max-height: 340px;
    aspect-ratio: 1 / 1;
    border: 5px solid rgb(255 255 255 / 85%);
    border-radius: 22px;
    object-fit: cover;
    object-position: center 40%;
    box-shadow: 0 16px 36px rgb(0 0 0 / 22%);
}

.about-intro h1 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.25rem);
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.about-intro p {
    max-width: 590px;
    margin: 0;
    color: #e1eaf6;
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.about-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.about-facts span {
    padding: 7px 12px;
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 999px;
    background: rgb(255 255 255 / 9%);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
}

.about-story {
    max-width: 900px;
}

.about-story p + p {
    margin-top: 16px;
}

.about-learning {
    margin: 20px 0;
    padding: 18px 24px 18px 44px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--ink);
}

.about-learning li + li {
    margin-top: 8px;
}

@media (max-width: 680px) {
    .navbar {
        min-height: 0;
        flex-direction: column;
        gap: 10px;
        padding: 14px 18px 18px;
    }

    .brand-group {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .nav-links {
        justify-content: center;
        gap: 4px;
    }

    .nav-links a {
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    body > h1 {
        padding: 42px 20px;
    }

    section {
        width: calc(100% - 32px);
        margin: 20px auto;
        padding: 24px 20px;
        border-radius: 14px;
    }

    .card-image {
        height: 200px;
    }

    .about-hero {
        padding: 32px 20px;
    }

    .about-hero-inner {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 24px;
        text-align: center;
    }

    .about-portrait {
        width: min(260px, 75vw);
        max-height: none;
    }

    .about-facts {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
