html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #e8eaf4;
    background: #101322;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.site-nav {
    background: #101322;
    border-bottom: 1px solid #24283d;
}

.navbar-brand {
    letter-spacing: 0;
}

.navbar-dark .navbar-nav .nav-link {
    color: #b8bfd9;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff;
}

.hero-section {
    min-height: 84vh;
    display: flex;
    align-items: center;
    padding: 120px 0 72px;
    background: #121629;
}

.hero-section h1 {
    max-width: 780px;
    margin-bottom: 18px;
    font-size: clamp(2.5rem, 6vw, 4.1rem);
    font-weight: 800;
    line-height: 1.05;
}

.hero-text {
    max-width: 760px;
    margin-bottom: 12px;
    color: #c9cede;
    font-size: 1.04rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn {
    border-radius: 6px;
    font-weight: 600;
}

.btn-primary {
    background: #5f4bb6;
    border-color: #5f4bb6;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #6c5ac8;
    border-color: #6c5ac8;
}

.btn-outline-light {
    border-color: #687096;
    color: #e7e9f5;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background: #252b4a;
    border-color: #7a83ad;
}

.profile-panel {
    display: grid;
    justify-items: center;
    gap: 22px;
    padding: 20px 0 0;
    text-align: center;
}

.profile-panel > div {
    width: 100%;
    text-align: center;
}

.profile-logo {
    width: 300px;
    height: 300px;
    display: block;
    border-radius: 50%;
    margin: 0 auto 24px;
    object-fit: contain;
}

.profile-label,
.section-kicker {
    margin: 0 0 10px;
    color: #9ba4df;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
}

.profile-panel h2,
.section-heading h2,
.contact-panel h2 {
    margin-bottom: 16px;
    font-weight: 800;
}

.profile-panel p,
.content-section p,
.contact-panel p {
    color: #c9cede;
    line-height: 1.7;
}

.profile-button {
    margin-top: 6px;
}

.content-section {
    padding: 84px 0;
    background: #101322;
}

.section-muted {
    background: #13172a;
}

.section-heading {
    max-width: 640px;
    margin-bottom: 34px;
}

.cv-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
}

.cv-main,
.cv-sidebar {
    display: grid;
    gap: 22px;
}

.cv-block {
    padding: 0 0 24px;
    border-bottom: 1px solid #2a3154;
    background: transparent;
}

.cv-block h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.12rem;
    font-weight: 800;
}

.cv-block h4 {
    margin: 0 0 6px;
    color: #e7e9f5;
    font-size: 1rem;
    font-weight: 800;
}

.cv-block p {
    margin-bottom: 0;
}

.cv-entry {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    padding: 14px 0;
    border-top: 1px solid #24283d;
}

.cv-entry:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.cv-entry:last-child {
    padding-bottom: 0;
}

.cv-date {
    color: #9ba4df;
    font-size: 0.9rem;
    font-weight: 700;
}

.award-list {
    display: grid;
    gap: 16px;
}

.award-list > div {
    padding-top: 16px;
    border-top: 1px solid #24283d;
}

.award-list > div:first-child {
    padding-top: 0;
    border-top: 0;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-list span {
    padding: 6px 9px;
    border: 1px solid #333a5c;
    border-radius: 6px;
    color: #d9ddec;
    background: #14182b;
    font-size: 0.92rem;
    font-weight: 600;
}

.info-list {
    display: grid;
    gap: 14px;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #24283d;
    background: transparent;
}

.info-list span {
    color: #9ba4df;
    font-weight: 600;
}

.project-card {
    display: block;
    height: 100%;
    padding: 22px;
    border: 1px solid #24283d;
    border-radius: 6px;
    color: inherit;
    background: #101322;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.project-card:hover,
.project-card:focus {
    border-color: #5f4bb6;
    color: inherit;
    background: #151936;
    text-decoration: none;
}

.project-card:focus {
    outline: 2px solid #9ba4df;
    outline-offset: 3px;
}

.project-number {
    color: #9ba4df;
    font-weight: 700;
}

.project-card h3 {
    margin: 16px 0 10px;
    font-size: 1.28rem;
    font-weight: 800;
}

.project-link {
    color: #9ba4df;
    font-weight: 700;
    text-decoration: none;
}

.project-link:hover,
.project-link:focus {
    color: #c2c8ff;
    text-decoration: underline;
}

.side-projects {
    max-width: 680px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid #24283d;
}

.side-projects h3 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.08rem;
    font-weight: 800;
}

.side-project-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 0;
    color: inherit;
    text-decoration: none;
}

.side-project-link span {
    color: #e8eaf4;
    font-weight: 800;
}

.side-project-link small {
    color: #c9cede;
}

.side-project-link:hover span,
.side-project-link:focus span {
    color: #c2c8ff;
}

.contact-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 34px;
    border: 1px solid #24283d;
    border-radius: 6px;
    background: #151936;
}

.contact-list p {
    margin: 0 0 8px;
}

.contact-list span {
    display: inline-block;
    min-width: 72px;
    color: #9ba4df;
    font-weight: 700;
}

.contact-list a {
    color: #e8eaf4;
    text-decoration: none;
}

.contact-list a:hover,
.contact-list a:focus {
    color: #c2c8ff;
    text-decoration: underline;
}

.site-footer {
    padding: 28px 0;
    color: #9aa2bf;
    background: #0c0f1d;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.project-page {
    min-height: 100vh;
}

.project-hero {
    padding: 128px 0 64px;
    background: #121629;
}

.project-hero h1 {
    max-width: 780px;
    margin: 10px 0 16px;
    font-size: clamp(2.5rem, 6vw, 4.1rem);
    font-weight: 800;
    line-height: 1.05;
}

.project-hero p {
    max-width: 720px;
    color: #c9cede;
    font-size: 1.08rem;
    line-height: 1.7;
}

.project-hero-content {
    display: flex;
    align-items: center;
    gap: 28px;
}

.project-logo {
    width: 140px;
    height: 140px;
    flex: 0 0 auto;
    border-radius: 12px;
    object-fit: contain;
}

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #9ba4df;
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover,
.back-link:focus {
    color: #c2c8ff;
    text-decoration: underline;
}

.project-detail {
    max-width: 820px;
    padding-bottom: 24px;
    border-bottom: 1px solid #2a3154;
}

.project-detail h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1.18rem;
    font-weight: 800;
}

.project-detail p {
    max-width: 760px;
    margin-bottom: 28px;
    color: #c9cede;
    line-height: 1.7;
}

.project-gallery {
    margin-top: 42px;
}

.project-gallery h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 1.18rem;
    font-weight: 800;
}

.project-carousel {
    width: 100%;
    overflow: hidden;
    border: 1px solid #24283d;
    border-radius: 6px;
    background: #101322;
}

.project-carousel .carousel-item {
    aspect-ratio: 16 / 10;
    background: #0c0f1d;
}

.project-carousel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-carousel .carousel-control-prev,
.project-carousel .carousel-control-next {
    width: 12%;
}

.project-image {
    display: block;
    width: 100%;
    max-width: 920px;
    aspect-ratio: 16 / 10;
    border: 1px solid #24283d;
    border-radius: 6px;
    background: #101322;
    object-fit: contain;
}

@media (max-width: 767px) {
    .hero-section {
        min-height: auto;
        padding-top: 104px;
    }

    .hero-section h1 {
        font-size: 3.2rem;
    }

    .profile-logo {
        width: 256px;
        height: 256px;
    }

    .project-hero-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .project-logo {
        width: 112px;
        height: 112px;
    }

    .cv-layout,
    .cv-entry {
        grid-template-columns: 1fr;
    }

    .cv-entry {
        gap: 8px;
    }

    .info-list div,
    .contact-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .side-project-link {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .contact-panel .btn {
        width: 100%;
    }
}
