:root {
    color-scheme: dark;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #07111f;
    color: #edf7ff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    line-height: 1.55;
    background: radial-gradient(circle at 50% 35%, #122a42 0, #07111f 58%);
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 3px solid #67d9ff;
    outline-offset: 4px;
}

.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 410px;
    padding: 48px max(28px, calc((100vw - 1160px) / 2));
    isolation: isolate;
    background: #0a1a2c url("0d634b96-56e3-415d-950c-7dacaaefded0.png") center / cover no-repeat;
}

.hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, rgba(5, 14, 28, .08) 25%, #07111f 100%);
}

.hero-content {
    max-width: 1160px;
    width: 100%;
    margin: 0 auto;
}

.hero-kicker, .eyebrow {
    margin: 0 0 9px;
    color: #74dfff;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.8rem, 7vw, 5.1rem);
    line-height: 1.05;
    letter-spacing: -.055em;
    text-shadow: 0 5px 30px #061020;
}

.hero .subtitle {
    margin: 12px 0 0;
    color: #c7deee;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.container {
    max-width: 1216px;
    margin: 0 auto;
    padding: 0 28px;
}

.contacts {
    position: relative;
    z-index: 1;
    margin-top: -18px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: minmax(0, 360px);
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 82px;
    padding: 17px 20px;
    border: 1px solid rgba(138, 217, 255, .25);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(39, 72, 98, .77), rgba(13, 31, 51, .83));
    box-shadow: inset 0 1px rgba(255, 255, 255, .13), 0 14px 36px rgba(0, 0, 0, .16);
    backdrop-filter: blur(18px);
}

.contact-icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 13px;
    color: #8deaff;
    background: rgba(65, 197, 242, .14);
    font-size: 1.1rem;
}

.contact-label {
    color: #a8c5d8;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.contact-item a {
    font-weight: 600;
    text-decoration-color: rgba(127, 223, 255, .55);
    text-underline-offset: 4px;
}

.contact-item a:hover {
    color: #83e8ff;
}

.projects {
    margin: 76px 0 88px;
}

.projects-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.projects-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -.045em;
}

.projects-intro {
    max-width: 560px;
    margin: 10px 0 0;
    color: #adc8d9;
    font-size: .96rem;
}

.carousel-controls {
    display: none;
    gap: 9px;
    flex: 0 0 auto;
}

.is-enhanced .carousel-controls {
    display: flex;
}

.carousel-control {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(135, 221, 255, .38);
    border-radius: 50%;
    background: rgba(20, 48, 73, .8);
    box-shadow: inset 0 1px rgba(255, 255, 255, .13);
    color: #d9f6ff;
    cursor: pointer;
    font: inherit;
    font-size: 1.5rem;
    transition: background .2s ease, transform .2s ease;
}

.carousel-control:hover {
    background: #1c5d7d;
    transform: translateY(-2px);
}

.carousel-toggle {
    width: auto;
    min-width: 109px;
    padding: 0 15px;
    border-radius: 999px;
    font-size: .84rem;
    font-weight: 700;
    white-space: nowrap;
}

.carousel-toggle[aria-pressed="true"] {
    border-color: rgba(147, 233, 255, .8);
    background: rgba(34, 111, 144, .85);
}

.carousel-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(119, 210, 247, .2);
    border-radius: 32px;
    background: radial-gradient(ellipse at 50% 0, rgba(44, 132, 177, .24), transparent 64%), linear-gradient(145deg, rgba(17, 49, 75, .78), rgba(6, 23, 39, .94));
    box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 30px 75px rgba(0, 0, 0, .26);
}

.carousel-shell::before, .carousel-shell::after {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    width: min(8vw, 90px);
    content: "";
    pointer-events: none;
}

.carousel-shell::before {
    left: 0;
    background: linear-gradient(90deg, #0d283e, transparent);
}

.carousel-shell::after {
    right: 0;
    background: linear-gradient(270deg, #0b243a, transparent);
}

.carousel-viewport {
    overflow-x: auto;
    padding: 44px 0 52px;
    outline-offset: -5px;
}

.is-enhanced .carousel-viewport {
    overflow: hidden;
    touch-action: pan-y;
}

.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
    padding: 0 20px;
    will-change: transform;
}

.project-card {
    position: relative;
    display: flex;
    flex: 0 0 clamp(266px, 29vw, 332px);
    flex-direction: column;
    min-height: 318px;
    padding: 25px;
    overflow: hidden;
    border: 1px solid rgba(153, 225, 255, .32);
    border-radius: 24px;
    background: linear-gradient(150deg, rgba(94, 173, 206, .24), rgba(18, 55, 83, .81) 47%, rgba(7, 27, 48, .9));
    box-shadow: inset 1px 1px rgba(255, 255, 255, .22), inset -1px -1px rgba(40, 143, 187, .16), 18px 24px 35px rgba(0, 5, 16, .3);
    backdrop-filter: blur(24px) saturate(135%);
    transform: perspective(900px) rotateY(-8deg) scale(.97);
    transform-origin: center;
    transition: border-color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.project-card::before {
    position: absolute;
    top: -60px;
    left: -85px;
    width: 220px;
    height: 180px;
    border-radius: 50%;
    background: rgba(113, 228, 255, .13);
    filter: blur(35px);
    content: "";
    pointer-events: none;
}

.project-card:hover, .project-card:focus-within {
    z-index: 1;
    border-color: rgba(163, 238, 255, .78);
    background: linear-gradient(150deg, rgba(97, 186, 222, .33), rgba(17, 59, 88, .91) 47%, rgba(9, 33, 54, .96));
    box-shadow: inset 1px 1px rgba(255, 255, 255, .32), 20px 30px 45px rgba(0, 5, 16, .43), 0 0 28px rgba(61, 194, 235, .12);
    transform: perspective(900px) rotateY(0) translateY(-8px) scale(1);
}

.project-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 28px;
}

.project-icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(124, 218, 251, .27);
    border-radius: 15px;
    background: rgba(98, 207, 244, .13);
    font-size: 1.3rem;
}

.project-kind {
    color: #a9ddf1;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-align: right;
    text-transform: uppercase;
}

.project-card h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 1.38rem;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.project-card p {
    margin: 0 0 25px;
    color: #cfdfeb;
    font-size: .9rem;
    line-height: 1.55;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    margin-top: auto;
    color: #a5efff;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(165, 239, 255, .6);
    text-underline-offset: 5px;
    overflow-wrap: anywhere;
}

.project-link:hover {
    color: #fff;
}

.project-link span {
    font-size: 1.15em;
}

.project-meta {
    margin-top: auto;
    color: #a8dcf1;
    font-size: .86rem;
    font-weight: 600;
}

.carousel-hint {
    margin: 16px 3px 0;
    color: #91b5cb;
    font-size: .8rem;
}

.carousel-status {
    min-height: 1.5em;
    margin: 8px 3px 0;
    color: #bceeff;
    font-size: .84rem;
    font-weight: 600;
}

.footer {
    padding: 27px 24px 38px;
    border-top: 1px solid rgba(148, 203, 228, .13);
    color: #93b1c5;
    font-size: .84rem;
    text-align: center;
}

@media (max-width: 700px) {
    .hero {
        min-height: 320px;
        padding: 32px 22px;
    }

    .container {
        padding: 0 18px;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .projects {
        margin: 62px 0 70px;
    }

    .projects-heading {
        align-items: start;
    }

    .projects-intro {
        font-size: .9rem;
    }

    .carousel-controls {
        align-self: end;
    }

    .carousel-shell {
        border-radius: 25px;
    }

    .carousel-viewport {
        padding: 27px 0 35px;
    }

    .project-card {
        flex-basis: min(78vw, 318px);
        min-height: 324px;
    }
}

@media (max-width: 480px) {
    .projects-heading {
        flex-wrap: wrap;
    }

    .carousel-controls {
        margin-left: auto;
    }

    .project-card {
        flex-basis: min(80vw, 300px);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .project-card, .carousel-control {
        transition: none;
    }

    .project-card:hover, .project-card:focus-within {
        transform: perspective(900px) rotateY(0);
    }
}
