/* =========================================================
   Variables
========================================================= */

:root {
    --background: #08111c;
    --background-light: #0d1926;
    --background-card: #101e2d;

    --text: #f1f5f9;
    --text-muted: #9cafc3;

    --accent: #42b6ff;
    --accent-light: #75caff;

    --border: rgba(255, 255, 255, 0.08);

    --container-width: 1180px;

    --radius: 10px;

    --transition: 0.25s ease;
}


/* =========================================================
   Reset
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--background);
    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    line-height: 1.6;
}

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

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

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


/* =========================================================
   General
========================================================= */

.container {
    width: min(
        calc(100% - 48px),
        var(--container-width)
    );

    margin: 0 auto;
}

.section {
    padding: 110px 0;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 12px;

    color: var(--accent);

    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.section-label span {
    display: block;

    width: 20px;
    height: 3px;

    background: var(--accent);

    border-radius: 10px;
}

.section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}


/* =========================================================
   Navigation
========================================================= */

.navbar {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 1000;

    height: 64px;

    background: rgba(8, 17, 28, 0.85);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.nav-container {
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    color: var(--accent);

    font-size: 1.25rem;
    font-weight: 800;

    letter-spacing: -0.05em;
}

nav {
    display: flex;
    align-items: center;

    gap: 34px;

    height: 100%;
}

nav a {
    position: relative;

    height: 100%;

    display: flex;
    align-items: center;

    color: #c5d2df;

    font-size: 0.9rem;

    transition: color var(--transition);
}

nav a:hover,
nav a.active {
    color: white;
}

nav a.active::after {
    content: "";

    position: absolute;

    bottom: 0;
    left: 0;
    right: 0;

    height: 2px;

    background: var(--accent);
}


/* =========================================================
   Hero
========================================================= */

.hero {
    position: relative;

    min-height: 680px;

    overflow: hidden;

    display: flex;
    align-items: stretch;

    padding-top: 64px;

    background:
        radial-gradient(
            circle at 75% 50%,
            rgba(66, 182, 255, 0.035),
            transparent 40%
        ),
        var(--background);
}

.hero-background {
    display: none;
}

.hero-container {
    position: relative;

    display: grid;
    grid-template-columns: 1fr 1fr;

    min-height: 616px;
}

.hero-content {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 70px 0;
}

.eyebrow {
    margin-bottom: 8px;

    color: var(--accent);

    font-size: 0.9rem;
    font-weight: 700;

    letter-spacing: 0.15em;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5.2rem);

    line-height: 1;

    letter-spacing: -0.055em;

    font-weight: 750;
}

.hero h1 span {
    color: var(--accent);
}

.hero h2 {
    margin-top: 14px;

    color: #c8dbed;

    font-size: clamp(1.4rem, 2.5vw, 2rem);

    font-weight: 400;
}

.hero-description {
    max-width: 480px;

    margin-top: 22px;

    color: var(--text-muted);

    font-size: 1.05rem;
}

.social-links {
    display: flex;

    gap: 12px;

    margin-top: 30px;
}

.social-button {
    width: 52px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.055);

    border: 1px solid var(--border);

    border-radius: 7px;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);
}

.social-button svg {
    width: 20px;
    height: 20px;

    fill: #e5edf5;
}

.social-button:hover {
    background: rgba(66, 182, 255, 0.12);

    border-color: rgba(66, 182, 255, 0.4);

    transform: translateY(-3px);
}

.scroll-indicator {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-top: 42px;

    color: #91a5b9;

    font-size: 0.85rem;
}

.mouse {
    width: 18px;
    height: 27px;

    display: block;

    border: 2px solid #7e9ab4;

    border-radius: 12px;

    position: relative;
}

.mouse::after {
    content: "";

    position: absolute;

    top: 5px;
    left: 50%;

    width: 3px;
    height: 6px;

    transform: translateX(-50%);

    background: var(--accent);

    border-radius: 3px;
}

.hero-image-wrapper {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100%;
}

.hero-image-wrapper::before {
    content: "";

    position: absolute;

    width: 80%;
    height: 80%;

    background: rgba(66, 182, 255, 0.08);

    filter: blur(70px);

    border-radius: 50%;

    z-index: 0;
}

.hero-image {
    position: relative;
    z-index: 1;

    width: min(480px, 90%);
    aspect-ratio: 1 / 1;

    object-fit: cover;

    border-radius: 18px;

    border: 1px solid rgba(66, 182, 255, 0.25);

    box-shadow:
        0 0 25px rgba(66, 182, 255, 0.18),
        0 20px 60px rgba(0, 0, 0, 0.35);

    opacity: 0.96;
}


/* =========================================================
   About
========================================================= */

.about-section {
    background: var(--background-light);

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.about-grid {
    display: grid;

    grid-template-columns:
        minmax(300px, 1fr)
        minmax(400px, 1fr);

    gap: 100px;

    align-items: center;
}

.about-text h2 {
    margin-bottom: 26px;
}

.about-text > p:not(.section-label) {
    margin-bottom: 18px;

    max-width: 600px;

    color: var(--text-muted);

    font-size: 1rem;
}

.skills-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 48px 40px;
}

.skill-icon {
    margin-bottom: 13px;

    color: var(--accent);

    font-size: 1.8rem;
    font-weight: 700;

    line-height: 1;
}

.skill h3 {
    margin-bottom: 7px;

    font-size: 1.05rem;
}

.skill p {
    color: var(--text-muted);

    font-size: 0.9rem;
}


/* =========================================================
   Projects
========================================================= */

.projects-section {
    background: var(--background);
}

.projects-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 42px;
}

.view-all {
    color: var(--accent);

    font-size: 0.9rem;
    font-weight: 600;

    transition:
        color var(--transition),
        transform var(--transition);
}

.view-all:hover {
    color: var(--accent-light);

    transform: translateX(3px);
}

.projects-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}

.project-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--background-card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    transition:
        transform 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-7px);

    border-color: rgba(66, 182, 255, 0.3);

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.25);
}

.project-image {
    position: relative;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #142536;
}

.project-image::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            transparent 55%,
            rgba(0, 0, 0, 0.25)
        );

    pointer-events: none;
}

.project-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.045);
}

.project-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    padding: 24px;
}

.project-content h3 {
    margin-bottom: 10px;

    font-size: 1.15rem;
}

.project-content p {
    color: var(--text-muted);

    font-size: 0.9rem;

    line-height: 1.7;
}

.project-link {
    margin-top: auto;
    padding-top: 22px;

    color: var(--accent);

    font-size: 0.85rem;
    font-weight: 600;
}


/* =========================================================
   Contact
========================================================= */

.contact-section {
    background:
        radial-gradient(
            circle at center,
            rgba(30, 111, 164, 0.12),
            transparent 55%
        ),
        var(--background-light);

    border-top: 1px solid var(--border);
}

.contact-container {
    text-align: center;
}

.contact-container .section-label {
    justify-content: center;
}

.contact-container h2 {
    margin-bottom: 16px;
}

.contact-container > p:not(.section-label) {
    max-width: 500px;

    margin: 0 auto;

    color: var(--text-muted);
}

.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 28px;

    padding: 12px 24px;

    background: var(--accent);

    color: #06111b;

    border-radius: 6px;

    font-size: 0.9rem;
    font-weight: 700;

    transition:
        background var(--transition),
        transform var(--transition);
}

.contact-button:hover {
    background: var(--accent-light);

    transform: translateY(-2px);
}


/* =========================================================
   Footer
========================================================= */

footer {
    background: #07101a;

    border-top: 1px solid var(--border);
}

.footer-container {
    min-height: 100px;

    display: grid;

    grid-template-columns: 1fr 2fr 1fr;

    align-items: center;
}

.footer-container > p {
    text-align: center;

    color: #71859a;

    font-size: 0.8rem;
}

.footer-links {
    display: flex;

    justify-content: flex-end;

    gap: 20px;
}

.footer-links a {
    color: #8498ac;

    font-size: 0.8rem;

    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 900px) {

    .hero-container {
        display: flex;
        flex-direction: column;
    }

    .hero {
        min-height: auto;
    }

    .hero-image-wrapper {
        position: relative;

        order: 1;

        min-height: auto;

        padding: 55px 0 20px;

        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-image-wrapper::before {
        content: "";

        position: absolute;

        width: 320px;
        height: 320px;

        background: rgba(66, 182, 255, 0.08);

        filter: blur(70px);

        border-radius: 50%;

        z-index: 0;
    }

    .hero-image {
        position: relative;
        z-index: 1;

        width: min(380px, 75vw);
        height: min(380px, 75vw);

        aspect-ratio: 1 / 1;

        object-fit: cover;

        border-radius: 18px;

        border: 1px solid rgba(255, 255, 255, 0.1);

        box-shadow:
            0 30px 70px rgba(0, 0, 0, 0.35),
            0 0 60px rgba(66, 182, 255, 0.06);
    }

    .hero-content {
        order: 2;

        min-height: auto;

        padding: 30px 0 40px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .projects-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .project-card:last-child {
        grid-column: span 2;
    }

    .scroll-indicator {
        display: none;
    }
}


@media (max-width: 650px) {

    .container {
        width: min(
            calc(100% - 32px),
            var(--container-width)
        );
    }

    .section {
        padding: 80px 0;
    }

    nav {
        gap: 18px;
    }

    nav a {
        font-size: 0.78rem;
    }

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

    .hero h2 {
        font-size: 1.35rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-content {
        min-height: auto;
    }

    .skills-grid {
        grid-template-columns: 1fr;

        gap: 32px;
    }

    .projects-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 18px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card:last-child {
        grid-column: auto;
    }

    .footer-container {
        padding: 28px 0;

        grid-template-columns: 1fr;

        gap: 18px;

        text-align: center;
    }

    .footer-container .logo {
        justify-self: center;
    }

    .footer-links {
        justify-content: center;
    }
}


@media (max-width: 450px) {

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-content {
        padding-top: 60px;
    }

    .social-button {
        width: 48px;
    }
}

/* =========================================================
   Project Pages
========================================================= */

.project-hero {
    padding-top: 64px;
    padding-bottom: 70px;

    background:
        radial-gradient(
            circle at 70% 40%,
            rgba(66, 182, 255, 0.07),
            transparent 40%
        ),
        var(--background);
}

.back-link {
    display: inline-block;

    margin-top: 34px;
    margin-bottom: 70px;

    color: var(--text-muted);

    font-size: 0.9rem;

    transition:
        color var(--transition),
        transform var(--transition);
}

.back-link:hover {
    color: var(--accent);

    transform: translateX(-4px);
}

.project-hero-content {
    max-width: 850px;
}

.project-hero h1 {
    margin-top: 12px;

    font-size: clamp(3rem, 7vw, 6rem);

    line-height: 1;

    letter-spacing: -0.055em;
}

.project-subtitle {
    max-width: 700px;

    margin-top: 25px;

    color: var(--text-muted);

    font-size: clamp(1.1rem, 2vw, 1.35rem);

    line-height: 1.7;
}

.technology-list {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 30px;
}

.technology-list span {
    padding: 7px 13px;

    background: rgba(66, 182, 255, 0.07);

    border: 1px solid rgba(66, 182, 255, 0.18);

    border-radius: 5px;

    color: #a8d9f5;

    font-size: 0.78rem;
}


/* =========================================================
   Project Media
========================================================= */

.project-media-section {
    padding-bottom: 110px;

    background: var(--background);
}

.project-media {
    position: relative;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--background-card);

    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.25);
}

.project-media::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            transparent 70%,
            rgba(0, 0, 0, 0.2)
        );

    pointer-events: none;
}

.project-media img {
    width: 100%;

    max-height: 650px;

    object-fit: cover;
}


/* =========================================================
   Project Sections
========================================================= */

.project-section {
    padding: 110px 0;

    background: var(--background);

    border-top: 1px solid var(--border);
}

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

.project-content-grid {
    display: grid;

    grid-template-columns:
        minmax(250px, 0.8fr)
        minmax(400px, 1.2fr);

    gap: 100px;
}

.project-content-grid h2 {
    max-width: 450px;
}

.project-text {
    color: var(--text-muted);

    font-size: 1rem;

    line-height: 1.8;
}

.project-text p {
    margin-bottom: 22px;
}

.project-text p:last-child {
    margin-bottom: 0;
}

.project-text h3 {
    margin-top: 35px;
    margin-bottom: 10px;

    color: var(--text);

    font-size: 1.15rem;
}

.project-text h3:first-child {
    margin-top: 0;
}

/* =========================================================
   Project Systems
========================================================= */

.project-systems {
    padding-bottom: 130px;
}

.systems-header {
    max-width: 700px;

    margin-bottom: 90px;
}

.systems-header h2 {
    margin-bottom: 18px;
}

.systems-intro {
    max-width: 600px;

    color: var(--text-muted);

    font-size: 1rem;

    line-height: 1.8;
}


/* =========================================================
   System Showcase
========================================================= */

.system-showcase {
    display: grid;

    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(300px, 0.85fr);

    align-items: center;

    gap: 90px;

    margin-bottom: 140px;
}

.system-showcase:last-child {
    margin-bottom: 0;
}


/* Reverse every second system */

.system-showcase-reverse {
    grid-template-columns:
        minmax(300px, 0.85fr)
        minmax(0, 1.15fr);
}

.system-showcase-reverse .system-media {
    order: 2;
}

.system-showcase-reverse .system-content {
    order: 1;
}


/* =========================================================
   System Media
========================================================= */

.system-media {
    position: relative;

    overflow: hidden;

    border: 1px solid var(--border);

    border-radius: 12px;

    background: var(--background-card);

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.25);
}

.system-media::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            transparent 70%,
            rgba(0, 0, 0, 0.18)
        );

    pointer-events: none;
}

.system-media img {
    display: block;

    width: 100%;

    aspect-ratio: 16 / 10;

    object-fit: cover;

    transition:
        transform 0.5s ease;
}

.system-media:hover img {
    transform: scale(1.025);
}


/* =========================================================
   System Content
========================================================= */

.system-content {
    max-width: 480px;
}

.system-number {
    display: block;

    margin-bottom: 18px;

    color: var(--accent);

    font-family: monospace;

    font-size: 0.8rem;

    letter-spacing: 0.08em;
}

.system-content h3 {
    margin-bottom: 20px;

    font-size: clamp(1.7rem, 3vw, 2.3rem);

    letter-spacing: -0.025em;
}

.system-content p {
    margin-bottom: 18px;

    color: var(--text-muted);

    line-height: 1.8;
}

.system-content p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   Challenges
========================================================= */

.project-section-alt .project-content-grid {
    align-items: start;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 900px) {

    .system-showcase,
    .system-showcase-reverse {
        grid-template-columns: 1fr;

        gap: 40px;

        margin-bottom: 100px;
    }

    .system-showcase-reverse .system-media {
        order: 1;
    }

    .system-showcase-reverse .system-content {
        order: 2;
    }

    .system-content {
        max-width: 650px;
    }

}


@media (max-width: 650px) {

    .project-systems {
        padding-bottom: 80px;
    }

    .systems-header {
        margin-bottom: 60px;
    }

    .system-showcase,
    .system-showcase-reverse {
        gap: 30px;

        margin-bottom: 80px;
    }

    .system-media img {
        aspect-ratio: 16 / 10;
    }

}

/* =========================================================
   Project End
========================================================= */

.project-end {
    padding: 120px 0;

    text-align: center;

    background:
        radial-gradient(
            circle at center,
            rgba(66, 182, 255, 0.08),
            transparent 50%
        ),
        var(--background-light);

    border-top: 1px solid var(--border);
}

.project-end .section-label {
    justify-content: center;
}

.project-end h2 {
    margin-bottom: 15px;
}

.project-end > .container > p:not(.section-label) {
    max-width: 500px;

    margin: 0 auto;

    color: var(--text-muted);
}

.project-end .contact-button {
    margin-top: 28px;
}


/* =========================================================
   Project Responsive
========================================================= */

@media (max-width: 900px) {

    .project-content-grid {
        grid-template-columns: 1fr;

        gap: 45px;
    }
}


@media (max-width: 650px) {

    .project-hero {
        padding-bottom: 50px;
    }

    .back-link {
        margin-top: 25px;
        margin-bottom: 50px;
    }

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

    .project-subtitle {
        font-size: 1rem;
    }

    .project-media-section {
        padding-bottom: 70px;
    }

    .project-section {
        padding: 80px 0;
    }

    .project-content-grid {
        gap: 35px;
    }

    .project-end {
        padding: 90px 0;
    }
}