:root {
    --bg-dark: #06101f;
    --bg-dark-soft: #0a1728;
    --surface-dark: rgba(14, 29, 48, 0.82);
    --surface-light: #ffffff;
    --surface-muted: #f5f7fb;
    --text-light: #f7fbff;
    --text-dark: #0d1726;
    --text-muted: #657184;
    --blue: #1478ff;
    --blue-bright: #2992ff;
    --line-dark: rgba(125, 179, 255, 0.22);
    --line-light: #e6ebf3;
    --shadow: 0 18px 45px rgba(18, 40, 72, 0.11);
    --radius: 18px;
    --container: 1280px;
    --header-height: 76px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    color: var(--text-dark);
    background: var(--surface-light);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 16px;
    z-index: 1000;
    padding: 10px 14px;
    color: #fff;
    background: var(--blue);
    border-radius: 8px;
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.section-dark {
    color: var(--text-light);
    background: var(--bg-dark);
}

.section-light {
    background: var(--surface-light);
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    height: var(--header-height);
    color: var(--text-light);
    background: rgba(4, 12, 24, 0.84);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100%;
}

.brand {
    display: inline-flex;
    gap: 14px;
    align-items: center;
    min-width: max-content;
}

.brand-mark {
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    font-weight: 900;
    letter-spacing: -0.08em;
    line-height: 1;
}

.brand-copy {
    display: grid;
    gap: 1px;
    padding-left: 14px;
    border-left: 1px solid currentColor;
    line-height: 1;
}

.brand-copy strong {
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: 1.22rem;
    letter-spacing: 0.025em;
}

.brand-copy small {
    font-size: 0.52rem;
    letter-spacing: 0.22em;
}

.main-nav {
    display: flex;
    gap: 34px;
    align-items: stretch;
    height: var(--header-height);
}

.main-nav a {
    position: relative;
    display: grid;
    place-items: center;
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.main-nav a::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    content: "";
    background: var(--blue);
    opacity: 0;
    transform: scaleX(0);
    transition: 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 0;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #fff;
    border-radius: 20px;
    transition: 180ms ease;
}

.hero {
    position: relative;
    min-height: 760px;
    padding: calc(var(--header-height) + 64px) 0 64px;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 40%, rgba(18, 108, 229, 0.12), transparent 34%),
        linear-gradient(135deg, #071321 0%, #030a13 100%);
}

.hero-grid-pattern,
.contact-grid-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.34;
    background-image: radial-gradient(rgba(43, 143, 255, 0.34) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to right, transparent, #000 45%, #000 80%, transparent);
}

.hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 0.88fr 1.12fr;
    gap: 80px;
    align-items: center;
}

.eyebrow,
.section-kicker,
.project-tag {
    margin: 0 0 6px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.code-accent {
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    letter-spacing: -0.04em;
}

.hero h1 {
    margin: 6px 0 0;
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: clamp(4.2rem, 8vw, 7.2rem);
    line-height: 0.89;
    letter-spacing: 0.01em;
}

.hero-role {
    margin: 18px 0 10px;
    color: var(--blue-bright);
    font-size: clamp(1.45rem, 2vw, 2rem);
    font-weight: 700;
}

.hero-intro {
    max-width: 570px;
    margin: 0;
    color: rgba(235, 244, 255, 0.78);
    font-size: 1.08rem;
}

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

.button {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    font-weight: 750;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, #0d6cf2, #198cff);
    box-shadow: 0 12px 28px rgba(16, 116, 255, 0.28);
}

.button-primary:hover {
    box-shadow: 0 16px 36px rgba(16, 116, 255, 0.38);
}

.button-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.64);
}

.code-card {
    max-width: 560px;
    margin-top: 30px;
    overflow: auto;
    color: #dbe9f8;
    background: rgba(7, 16, 28, 0.78);
    border: 1px solid rgba(136, 181, 232, 0.25);
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.code-card ol {
    margin: 0;
    padding: 14px 18px 14px 52px;
}

.code-card li {
    padding-left: 8px;
    color: #718199;
    font-size: 0.82rem;
}

.code-card code {
    color: #dbe9f8;
}

.code-green { color: #59db81; }
.code-purple { color: #d67df0; }
.code-yellow { color: #f5c95b; }

.systems-map {
    position: relative;
    min-height: 540px;
}

.systems-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.systems-lines path {
    fill: none;
    stroke: #1686ff;
    stroke-width: 2.4;
    filter: drop-shadow(0 0 6px rgba(31, 143, 255, 0.74));
    stroke-dasharray: 10 6;
    animation: flow 12s linear infinite;
}

.systems-lines circle {
    fill: #38a2ff;
    filter: drop-shadow(0 0 8px #2494ff);
}

@keyframes flow {
    to { stroke-dashoffset: -220; }
}

.system-node {
    position: absolute;
    display: grid;
    gap: 7px;
    place-items: center;
    width: 114px;
    min-height: 100px;
    padding: 15px;
    text-align: center;
    background: linear-gradient(145deg, rgba(19, 37, 59, 0.98), rgba(8, 19, 33, 0.96));
    border: 1px solid rgba(108, 167, 232, 0.3);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 0 20px rgba(31, 130, 246, 0.04);
}

.system-node strong {
    font-size: 0.86rem;
}

.node-icon {
    color: #69b3ff;
    font-size: 1.65rem;
}

.node-center {
    top: 50%;
    left: 50%;
    width: 154px;
    min-height: 136px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 34px rgba(22, 132, 255, 0.2), inset 0 0 30px rgba(32, 136, 255, 0.08);
}

.node-logo {
    font-family: "Arial Narrow", Impact, sans-serif;
    font-size: 2.35rem;
    letter-spacing: -0.07em;
}

.node-center small {
    font-weight: 700;
    letter-spacing: 0.16em;
}

.node-webapp { top: 4%; left: calc(50% - 57px); }
.node-api { top: 34%; left: 2%; }
.node-company { top: 34%; right: 2%; }
.node-kiosk { bottom: 3%; left: 17%; }
.node-database { right: 17%; bottom: 3%; }

.about,
.services,
.projects,
.technologies {
    padding: 78px 0;
}

.about {
    background: linear-gradient(180deg, #fff, #fafcff);
}

.about-layout {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 80px;
    align-items: center;
}

.section-copy h2,
.section-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.section-copy > p:not(.section-kicker) {
    max-width: 630px;
    color: var(--text-muted);
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px 24px;
    margin-top: 32px;
}

.feature-list span {
    position: relative;
    padding-left: 24px;
    font-weight: 650;
}

.feature-list span::before {
    position: absolute;
    top: 0.1em;
    left: 0;
    color: var(--blue);
    content: "✓";
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.metric-card,
.service-card,
.project-card {
    background: #fff;
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.metric-card {
    display: grid;
    align-content: center;
    min-height: 230px;
    padding: 26px 18px;
    text-align: center;
}

.metric-icon,
.card-icon {
    color: var(--blue);
    font-size: 2rem;
    font-weight: 800;
}

.metric-card strong {
    margin-top: 18px;
    font-size: clamp(1.6rem, 3vw, 2.65rem);
    line-height: 1.05;
}

.metric-card p {
    margin: 10px 0 0;
    color: var(--text-muted);
}

.services {
    padding-top: 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.service-card,
.project-card {
    padding: 26px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.service-card:hover,
.project-card:hover {
    border-color: rgba(20, 120, 255, 0.35);
    box-shadow: 0 24px 50px rgba(18, 40, 72, 0.15);
    transform: translateY(-4px);
}

.service-card h3,
.project-card h3 {
    margin: 14px 0 8px;
    font-size: 1.15rem;
}

.service-card p,
.project-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.projects {
    background: var(--surface-muted);
}

.projects-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
    gap: 22px;
    margin-top: 32px;
}

.project-featured {
    position: relative;
    display: grid;
    grid-template-columns: 0.77fr 1.23fr;
    min-height: 520px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 75% 20%, rgba(27, 119, 232, 0.18), transparent 35%),
        linear-gradient(140deg, #071321, #02060c);
    border: 1px solid rgba(105, 166, 232, 0.2);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(5, 17, 35, 0.22);
}

.project-copy {
    position: relative;
    z-index: 2;
    padding: 38px;
}

.project-copy h3 {
    margin: 0;
    font-size: 2.5rem;
}

.project-subtitle {
    margin: 2px 0 18px;
    color: #fff;
    font-weight: 700;
}

.project-copy > p:not(.project-tag):not(.project-subtitle) {
    color: rgba(233, 242, 252, 0.72);
}

.project-copy ul {
    padding: 0;
    margin: 22px 0 28px;
    list-style: none;
}

.project-copy li {
    position: relative;
    padding-left: 22px;
    color: rgba(244, 249, 255, 0.9);
}

.project-copy li::before {
    position: absolute;
    left: 0;
    color: var(--blue-bright);
    content: "✓";
}

.device-composition {
    position: relative;
    min-height: 500px;
}

.laptop {
    position: absolute;
    top: 23%;
    left: -2%;
    width: 72%;
    transform: perspective(1100px) rotateY(5deg) rotateX(2deg);
    filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.48));
}

.laptop-screen {
    padding: 7px;
    overflow: hidden;
    background: #151a21;
    border: 2px solid #313943;
    border-radius: 10px 10px 3px 3px;
}

.laptop-screen img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: center top;
}

.laptop-base {
    width: 112%;
    height: 13px;
    margin-left: -6%;
    background: linear-gradient(#cfd4da, #78818c);
    border-radius: 2px 2px 10px 10px;
    clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
}

.device-phone {
    position: absolute;
    z-index: 2;
    right: 30%;
    bottom: 1%;
    width: 30%;
    max-height: 420px;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.58));
}

.device-kiosk {
    position: absolute;
    right: -4%;
    bottom: -1%;
    width: 34%;
    max-height: 485px;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.58));
}

.project-cards {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 18px;
}

.technologies {
    padding: 44px 0;
}

.technologies-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
    gap: 38px;
    align-items: center;
}

.technology-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.technology-list span {
    min-width: 118px;
    padding: 12px 18px;
    text-align: center;
    font-weight: 800;
    background: #fff;
    border: 1px solid var(--line-light);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(18, 40, 72, 0.08);
}

.contact {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 50%, rgba(25, 126, 255, 0.2), transparent 26%),
        #06101f;
}

.contact-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: center;
    min-height: 170px;
}

.contact-icon {
    display: grid;
    width: 70px;
    height: 70px;
    place-items: center;
    color: #fff;
    font-size: 1.5rem;
    border: 1px solid var(--blue);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(27, 130, 255, 0.35);
}

.contact h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.contact p {
    margin: 4px 0 0;
    color: rgba(236, 244, 255, 0.72);
}

.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-layout {
    min-height: 118px;
    gap: 30px;
}

.footer-layout p {
    margin: 0;
    color: rgba(238, 245, 255, 0.62);
    font-size: 0.82rem;
}

.back-top {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1080px) {
    .main-nav { gap: 20px; }
    .hero-layout { gap: 30px; }
    .about-layout { grid-template-columns: 1fr; }
    .metrics-grid { max-width: 900px; }
    .projects-layout { grid-template-columns: 1fr; }
    .project-cards { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto; }
}

@media (max-width: 860px) {
    :root { --header-height: 68px; }

    .brand-copy strong { font-size: 1rem; }
    .brand-copy small { font-size: 0.45rem; }

    .menu-toggle {
        display: block;
        position: relative;
        z-index: 110;
    }

    .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .main-nav {
        position: fixed;
        inset: var(--header-height) 0 auto;
        display: grid;
        gap: 0;
        height: auto;
        padding: 14px 20px 22px;
        background: rgba(4, 12, 24, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-16px);
        transition: 180ms ease;
    }

    .main-nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .main-nav a {
        justify-content: start;
        min-height: 48px;
    }

    .main-nav a::after { display: none; }

    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + 50px);
    }

    .hero-layout,
    .about-layout,
    .technologies-layout {
        grid-template-columns: 1fr;
    }

    .systems-map {
        width: min(100%, 680px);
        margin-inline: auto;
    }

    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }

    .project-featured {
        grid-template-columns: 1fr;
        min-height: 880px;
    }

    .project-copy { padding-bottom: 0; }
    .device-composition { min-height: 500px; }
    .technology-list { justify-content: flex-start; }
}

@media (max-width: 620px) {
    .container { width: min(calc(100% - 28px), var(--container)); }
    .brand-copy { display: none; }
    .brand-mark { font-size: 2rem; }

    .hero h1 { font-size: clamp(3.5rem, 19vw, 5.2rem); }
    .hero-actions { display: grid; }
    .button { width: 100%; }
    .code-card { font-size: 0.72rem; }

    .systems-map {
        min-height: 440px;
        transform: scale(0.92);
        transform-origin: top center;
        margin-bottom: -32px;
    }

    .system-node { width: 94px; min-height: 82px; padding: 10px; }
    .node-center { width: 128px; min-height: 112px; }
    .node-logo { font-size: 1.8rem; }
    .node-webapp { left: calc(50% - 47px); }
    .node-api { left: 0; }
    .node-company { right: 0; }
    .node-kiosk { left: 7%; }
    .node-database { right: 7%; }

    .about,
    .services,
    .projects,
    .technologies { padding: 56px 0; }

    .metrics-grid,
    .services-grid,
    .project-cards,
    .feature-list { grid-template-columns: 1fr; }

    .metric-card { min-height: 180px; }

    .project-featured {
        min-height: 780px;
    }

    .project-copy { padding: 28px 24px 0; }
    .device-composition { min-height: 430px; }
    .laptop { top: 27%; left: -1%; width: 78%; }
    .device-phone { right: 26%; width: 32%; max-height: 330px; }
    .device-kiosk { right: -7%; width: 39%; max-height: 390px; }

    .technology-list span { flex: 1 1 calc(50% - 8px); min-width: 0; }

    .contact-layout {
        grid-template-columns: 1fr;
        padding: 44px 0;
        text-align: center;
    }

    .contact-icon { margin-inline: auto; }
    .footer-layout { flex-direction: column; align-items: flex-start; padding: 28px 0; }
    .back-top { position: absolute; right: 20px; }
}
