:root {
    --bg: #080512;
    --panel: #130b24;
    --panel-soft: #1b1033;
    --line: rgba(216, 180, 254, .18);
    --text: #fbf7ff;
    --muted: #c9b8de;
    --accent: #c084fc;
    --accent-2: #f0abfc;
    --warm: #f9a8d4;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(192, 132, 252, .28), transparent 28rem),
        radial-gradient(circle at 86% 18%, rgba(240, 171, 252, .18), transparent 24rem),
        radial-gradient(circle at 50% 100%, rgba(124, 58, 237, .22), transparent 32rem),
        linear-gradient(135deg, #080512 0%, #160a2c 52%, #0b0618 100%);
    color: var(--text);
    font-family: "Space Grotesk", Arial, sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: rgba(192, 132, 252, .2);
    filter: blur(70px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.navbar,
main {
    position: relative;
    z-index: 1;
}

.navbar {
    width: min(1120px, calc(100% - 32px));
    min-height: 78px;
    margin: 18px auto 0;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(19, 11, 36, .78);
    backdrop-filter: blur(18px);
    z-index: 20;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: .96rem;
    font-weight: 700;
    text-decoration: none;
}

.brand img {
    width: 48px;
    height: 48px;
    border: 2px solid rgba(240, 171, 252, .35);
    border-radius: 50%;
    object-fit: cover;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    min-height: 44px;
    padding: 11px 15px;
    border-radius: 6px;
    color: var(--muted);
    font-size: .95rem;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: rgba(192, 132, 252, .13);
    color: var(--text);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(192, 132, 252, .08);
    cursor: pointer;
    position: relative;
    z-index: 31;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    transition: transform .2s ease;
}

main {
    width: min(1120px, calc(100% - 32px));
    margin: 18px auto 64px;
}

.section-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(19, 11, 36, .72);
    box-shadow: 0 24px 80px rgba(8, 5, 18, .28);
}

.hero {
    min-height: calc(100vh - 180px);
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    overflow: hidden;
}

.hero-visual {
    position: relative;
    min-height: 560px;
    padding: clamp(32px, 7vw, 76px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        radial-gradient(circle at 18% 22%, rgba(240, 171, 252, .45), transparent 18rem),
        radial-gradient(circle at 82% 28%, rgba(168, 85, 247, .46), transparent 20rem),
        radial-gradient(circle at 62% 82%, rgba(76, 29, 149, .82), transparent 24rem),
        linear-gradient(135deg, #2e1065 0%, #581c87 45%, #12051f 100%);
    transform-style: preserve-3d;
    transition: transform .18s ease;
    overflow: hidden;
}

.hero-visual::before,
.hero-visual::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.hero-visual::before {
    inset: 10%;
    border: 1px solid rgba(250, 232, 255, .2);
    border-radius: 8px;
    transform: rotate(-4deg);
    box-shadow: inset 0 0 60px rgba(216, 180, 254, .08);
}

.hero-visual::after {
    right: clamp(24px, 5vw, 64px);
    top: clamp(24px, 6vw, 74px);
    width: clamp(120px, 20vw, 230px);
    aspect-ratio: 1;
    border: 1px solid rgba(250, 232, 255, .24);
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .24), transparent 52%),
        conic-gradient(from 130deg, rgba(240, 171, 252, .86), rgba(192, 132, 252, .8), rgba(99, 102, 241, .68), rgba(240, 171, 252, .86));
    opacity: .82;
    box-shadow: 0 0 80px rgba(192, 132, 252, .34);
}

.hero-visual > * {
    position: relative;
    z-index: 1;
}

.eyebrow,
.section-kicker {
    color: var(--accent-2);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin-top: 12px;
    font-size: clamp(4rem, 10vw, 8.8rem);
    line-height: .86;
}

.hero-location {
    margin-top: 24px;
    color: rgba(250, 232, 255, .84);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-copy {
    padding: clamp(28px, 4vw, 56px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid var(--line);
}

.intro {
    margin-bottom: 18px;
    color: var(--text);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1.15;
}

.hero-copy p:not(.intro),
.profile p,
.skills-grid p,
.project-card p {
    color: var(--muted);
}

.hero-actions,
.contact-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    min-height: 46px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-2px);
}

.btn.primary {
    background: linear-gradient(135deg, #f5d0fe, #c084fc 48%, #8b5cf6);
    color: #160a2c;
    box-shadow: 0 14px 40px rgba(192, 132, 252, .28);
}

.btn.secondary {
    border-color: var(--line);
    background: rgba(192, 132, 252, .08);
    color: var(--text);
}

.profile,
.contact {
    margin-top: 18px;
    padding: clamp(28px, 5vw, 56px);
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: clamp(24px, 5vw, 72px);
    align-items: start;
}

.section-heading {
    padding: clamp(28px, 5vw, 48px) clamp(28px, 5vw, 56px) 0;
}

.profile h2,
.contact h2,
.section-heading h2 {
    margin-top: 8px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
}

#competences,
#projets {
    margin-top: 18px;
    overflow: hidden;
}

.skills-grid,
.projects-grid {
    padding: clamp(24px, 5vw, 56px);
    display: grid;
    gap: 16px;
}

.skills-grid {
    grid-template-columns: repeat(3, 1fr);
}

.skills-grid article,
.project-card {
    min-height: 210px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(192, 132, 252, .11), rgba(255, 255, 255, .025)),
        rgba(27, 16, 51, .72);
}

.skills-grid h3,
.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.24rem;
}

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

.project-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    position: relative;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.project-card:hover {
    border-color: rgba(240, 171, 252, .42);
    box-shadow: 0 18px 60px rgba(126, 34, 206, .22);
    transform: translateY(-4px);
}

.featured-project {
    grid-column: span 2;
}

.project-media {
    min-height: 170px;
    margin: -24px -24px 4px;
    padding: 22px;
    display: grid;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 20%, rgba(240, 171, 252, .38), transparent 13rem),
        linear-gradient(135deg, rgba(88, 28, 135, .95), rgba(30, 10, 58, .95));
}

.project-media span {
    display: block;
    border-radius: 6px;
    background: rgba(255, 255, 255, .16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.portfolio-preview {
    grid-template-columns: 1.3fr .7fr;
    grid-template-rows: 1fr 1fr;
}

.portfolio-preview span:first-child {
    grid-row: span 2;
    background: linear-gradient(135deg, rgba(245, 208, 254, .75), rgba(168, 85, 247, .4));
}

.app-preview {
    grid-template-columns: .85fr 1.15fr;
}

.app-preview span:first-child {
    grid-row: span 3;
    background: rgba(216, 180, 254, .22);
}

.website-preview {
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
}

.website-preview span {
    min-height: 72px;
}

.website-preview span:first-child {
    min-height: 116px;
}

.website-preview span:nth-child(2) {
    min-height: 144px;
    background: linear-gradient(180deg, rgba(240, 171, 252, .62), rgba(124, 58, 237, .28));
}

.dashboard-preview {
    grid-template-columns: 1.2fr .8fr .8fr;
    grid-template-rows: .8fr 1fr;
}

.dashboard-preview span:first-child {
    grid-row: span 2;
    background: linear-gradient(135deg, rgba(250, 232, 255, .72), rgba(192, 132, 252, .3));
}

.project-number {
    color: var(--warm);
    font-weight: 700;
}

.tags {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    padding: 6px 10px;
    border: 1px solid rgba(240, 171, 252, .24);
    border-radius: 999px;
    color: #e9d5ff;
    font-size: .82rem;
    background: rgba(192, 132, 252, .08);
}

.project-links {
    padding-top: 8px;
    display: flex;
    gap: 10px;
}

.project-links a {
    min-height: 38px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(240, 171, 252, .28);
    border-radius: 6px;
    color: #f5d0fe;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.project-links a:hover,
.project-links a:focus-visible {
    background: rgba(240, 171, 252, .14);
    color: var(--text);
}

.contact {
    align-items: center;
}

.contact-actions {
    justify-content: flex-end;
    margin-top: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
}

.error-page {
    width: min(680px, calc(100% - 32px));
    margin: 80px auto;
    padding: clamp(28px, 5vw, 56px);
}

.error-page h1 {
    margin: 8px 0 16px;
    font-size: clamp(2.4rem, 7vw, 4.6rem);
    line-height: 1;
}

.error-page p:not(.section-kicker) {
    margin-bottom: 28px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .hero,
    .profile,
    .contact,
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .featured-project {
        grid-column: span 1;
    }

    .hero {
        min-height: auto;
    }

    .hero-visual {
        min-height: 430px;
    }

    .hero-copy {
        border-top: 1px solid rgba(255, 255, 255, .09);
        border-left: 0;
    }

    .contact-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .navbar {
        width: min(100% - 24px, 1120px);
        margin-top: 12px;
    }

    .brand span {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        right: 12px;
        left: 12px;
        padding: 12px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: rgba(19, 11, 36, .98);
        box-shadow: 0 24px 70px rgba(8, 5, 18, .55);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity .2s ease, transform .2s ease;
        z-index: 30;
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links a {
        width: 100%;
        color: var(--text);
    }

    .menu-toggle[aria-expanded="true"] span:first-child {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:last-child {
        transform: translateY(-7px) rotate(-45deg);
    }

    main {
        width: min(100% - 24px, 1120px);
        margin-top: 12px;
    }

    .hero-visual {
        min-height: 380px;
    }

    .btn {
        width: 100%;
    }
}
