:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --grey: #9ca3af;
    --cyan: #22d3ee;
    --orange: #f97316;
    --line: #1f2937;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--black);
    color: var(--white);
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: var(--cyan);
    color: var(--black);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border: 3px solid var(--black);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--orange);
}

* {
    scrollbar-color: var(--cyan) var(--black);
    scrollbar-width: thin;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    width: 100%;
    padding: 18px 8%;
    background: rgba(10, 10, 10, .94);
    border-bottom: 1px solid var(--line);
    transition: transform .25s ease, opacity .25s ease;
}

.site-header.hidden {
    opacity: 0;
    transform: translateY(-110%);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.logo {
    color: var(--white);
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
}

.logo span {
    color: var(--cyan);
}

.logo:hover,
.logo:focus {
    color: var(--cyan);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a,
.footer-links a {
    color: var(--grey);
    text-decoration: none;
    transition: color .2s ease;
}

.nav-links a:hover,
.nav-links a:focus,
.footer-links a:hover,
.footer-links a:focus {
    color: var(--cyan);
}

.nav-links a.active {
    color: var(--white);
    border-bottom: 2px solid var(--cyan);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--white);
    cursor: pointer;
    font-size: 1.4rem;
}

main {
    padding-top: 76px;
}

.hero {
    display: flex;
    align-items: center;
    gap: 56px;
    min-height: 84vh;
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 8%;
}

.hero-text,
.hero-image {
    flex: 1;
}

.hero-text h1 {
    color: var(--white);
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 14px;
}

.hero-text p {
    color: var(--grey);
    font-size: clamp(1rem, 2vw, 1.15rem);
    margin-bottom: 26px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-image img {
    width: min(100%, 390px);
    border: 2px solid var(--cyan);
    border-radius: 12px;
    box-shadow: 18px 18px 0 rgba(34, 211, 238, .24), 0 0 42px rgba(34, 211, 238, .42);
}

.btn,
.btn-primary,
.btn-secondary,
.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.btn-primary {
    background: var(--cyan);
    color: var(--black);
    border: 1px solid var(--cyan);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--orange);
    border-color: var(--orange);
    transform: translateY(-2px);
}

.btn-secondary,
.view-all {
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
}

.btn-secondary:hover,
.btn-secondary:focus,
.view-all:hover,
.view-all:focus {
    background: var(--cyan);
    color: var(--black);
    transform: translateY(-2px);
}

.page-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 8%;
}

.page-section h1,
.page-section h2 {
    color: var(--white);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 18px;
}

.page-section h3 {
    color: var(--white);
    margin-bottom: 8px;
}

.page-section p {
    color: var(--grey);
    max-width: 700px;
}

.page-section p + p {
    margin-top: 14px;
}

.section-intro {
    margin-bottom: 28px;
}

.cards,
.projects-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.summary-section {
    padding-top: 24px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.summary-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.summary-card p {
    flex: 1;
    margin-bottom: 20px;
}

.card,
.project-card {
    border: 1px solid var(--line);
    padding: 22px;
    background: #101010;
}

.card:hover,
.project-card:hover {
    border-color: var(--cyan);
}

.card i {
    color: var(--cyan);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.project-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-bottom: 16px;
}

.project-card .tech {
    color: var(--orange);
    font-size: .9rem;
    margin-top: 10px;
}

.contact-list {
    list-style: none;
    margin-top: 24px;
}

.contact-list li {
    color: var(--grey);
    margin: 12px 0;
}

.contact-list i {
    color: var(--cyan);
    margin-right: 10px;
    width: 18px;
}

.contact-list a {
    color: var(--grey);
    text-decoration: none;
}

.contact-list a:hover,
.contact-list a:focus {
    color: var(--cyan);
}

.contact-form {
    display: grid;
    gap: 16px;
    max-width: 700px;
    margin-top: 34px;
}

.form-field {
    display: grid;
    gap: 6px;
}

.form-field label {
    color: var(--white);
    font-weight: 600;
}

.form-field input,
.form-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px;
    background: #101010;
    color: var(--white);
    font: inherit;
}

.form-field textarea {
    min-height: 150px;
    resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
    border-color: var(--cyan);
}

.contact-form .btn-primary {
    justify-content: center;
}

.form-status {
    color: var(--cyan);
    min-height: 1.6em;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 8%;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-inner p {
    color: var(--grey);
    font-size: .9rem;
}

.footer-links {
    display: flex;
    gap: 18px;
}

.socials a {
    color: var(--grey);
    margin-left: 14px;
    font-size: 1.15rem;
}

.socials a:hover {
    color: var(--cyan);
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--cyan);
    border-radius: 4px;
    background: var(--black);
    color: var(--cyan);
    cursor: pointer;
    z-index: 900;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    background: var(--cyan);
    color: var(--black);
}

@media (max-width: 760px) {
    .site-header {
        padding: 16px 6%;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px 8%;
        background: var(--black);
        border-bottom: 1px solid var(--line);
        z-index: 1001;
    }

    .nav-links.open {
        display: flex;
    }

    main {
        padding-top: 68px;
    }

    .hero {
        flex-direction: column-reverse;
        justify-content: center;
        min-height: auto;
        padding-top: 70px;
        text-align: center;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image img {
        width: min(82vw, 320px);
    }

    .page-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .summary-grid,
    .cards,
    .projects-list {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
