:root {
    --bg: #050816;
    --bg-secondary: #0b1024;
    --card: rgba(255, 255, 255, 0.06);
    --card-border: rgba(255, 255, 255, 0.12);
    --text: #f5f7ff;
    --muted: #b8c0e0;
    --primary: #00d2ff;
    --primary-2: #7c3aed;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --radius: 20px;
    --max-width: 1150px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(0, 210, 255, 0.15), transparent 30%),
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.18), transparent 30%),
        linear-gradient(180deg, #030712 0%, #07111f 45%, #050816 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

body.modal-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font: inherit;
}

.container {
    width: min(92%, var(--max-width));
    margin: 0 auto;
}

/* HEADER */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    background: rgba(5, 8, 22, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-links a {
    color: var(--muted);
    font-weight: 600;
    transition: 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.4rem;
    cursor: pointer;
}

/* HERO */
.hero {
    padding: 90px 0 60px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 40px;
}

.hero-text .tag {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid rgba(0, 210, 255, 0.25);
    background: rgba(0, 210, 255, 0.08);
    color: #9cecff;
    border-radius: 999px;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 18px;
}

.hero-text h1 span {
    background: linear-gradient(90deg, var(--primary), #7ee7ff, var(--primary-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.08rem;
    color: var(--muted);
    max-width: 650px;
    margin-bottom: 28px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 28px;
}

.btn {
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00a7ff);
    color: #001219;
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
}

.btn-secondary {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
}

.socials {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.socials a {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 1.15rem;
    transition: 0.3s ease;
}

.socials a:hover {
    transform: translateY(-4px) scale(1.03);
    background: rgba(0, 210, 255, 0.12);
    border-color: rgba(0, 210, 255, 0.25);
    color: var(--primary);
}

.hero-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--card-border);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -80px auto auto -80px;
    width: 180px;
    height: 180px;
    background: rgba(0, 210, 255, 0.18);
    filter: blur(60px);
    border-radius: 50%;
}

.profile-box {
    text-align: center;
    position: relative;
    z-index: 1;
}

.profile-box img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(0, 210, 255, 0.35);
    margin: 0 auto 18px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}

.profile-box h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.profile-box p {
    color: var(--muted);
    margin-bottom: 18px;
}

.mini-infos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.mini-card {
    background: rgba(255, 255, 255, 0.04);
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-card strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.mini-card span {
    color: var(--muted);
    font-size: 0.92rem;
}

/* SECTIONS */
section {
    padding: 80px 0;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--muted);
    max-width: 700px;
    margin-bottom: 36px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.card p {
    color: var(--muted);
}

/* TECHS */
.tech-card-wrapper {
    padding: 34px 36px;
    overflow: hidden;
}

.tech-header {
    margin-bottom: 24px;
}

.tech-header h3 {
    margin-bottom: 0;
}

.tech-selector-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-selector {
    display: flex;
    align-items: flex-end;
    gap: 34px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    width: 100%;
    padding: 24px 80px 18px;
    scroll-snap-type: x mandatory;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.tech-selector::-webkit-scrollbar {
    display: none;
}

.tech-class {
    flex: 0 0 170px;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    padding: 12px 8px;
    scroll-snap-align: center;
    transition: transform 0.35s ease, opacity 0.35s ease, filter 0.35s ease;
    opacity: 0.55;
    filter: blur(0.2px);
    transform: scale(0.86);
}

.tech-class.active {
    opacity: 1;
    transform: scale(1.08);
    filter: none;
}

.tech-class i {
    font-size: 4.5rem;
    line-height: 1;
    transition: transform 0.35s ease, text-shadow 0.35s ease;
    animation: techFloat 3.5s ease-in-out infinite;
}

.tech-class.active i {
    transform: translateY(-6px);
    text-shadow: 0 10px 28px rgba(255, 255, 255, 0.12);
}

.tech-class span {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    line-height: 1.2;
}

.tech-class.html i { color: #e34f26; }
.tech-class.css i { color: #1572b6; }
.tech-class.js i { color: #f7df1e; }
.tech-class.github i { color: #ffffff; }
.tech-class.responsive i { color: #38bdf8; }
.tech-class.api i { color: #a78bfa; }
.tech-class.dom i { color: #22d3ee; }
.tech-class.uiux i { color: #f472b6; }

.tech-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(12, 18, 39, 0.88);
    color: white;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
    backdrop-filter: blur(10px);
}

.tech-arrow:hover {
    background: rgba(20, 28, 52, 0.98);
    transform: translateY(-50%) scale(1.06);
}

.tech-arrow-left {
    left: 0;
}

.tech-arrow-right {
    right: 0;
}

@keyframes techFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
    100% { transform: translateY(0); }
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
}

.project-open {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-align: left;
}

.project-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.18), rgba(124, 58, 237, 0.22));
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.06);
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 10, 24, 0.38);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-content {
    padding: 24px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-content p {
    color: var(--muted);
    margin-bottom: 18px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.project-tags span {
    font-size: 0.88rem;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.14);
    color: #b6f6ff;
}

.project-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.project-links a,
.project-detail-btn {
    padding: 11px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-weight: 600;
    transition: 0.3s ease;
}

.project-detail-btn {
    cursor: pointer;
}

.project-links a:hover,
.project-detail-btn:hover {
    background: rgba(255, 255, 255, 0.09);
}

/* MODAL */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.project-modal.active {
    display: flex;
}

.project-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

.project-modal-content {
    position: relative;
    width: min(100%, 950px);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 24px;
    background: linear-gradient(180deg, #0c1227 0%, #08101d 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.project-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    cursor: pointer;
    font-size: 1.3rem;
    z-index: 2;
}

.project-modal-header {
    height: 320px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.project-modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-modal-body {
    padding: 28px;
}

.project-modal-body h2 {
    font-size: 2rem;
    margin-bottom: 14px;
}

.project-modal-body p {
    color: var(--muted);
    margin-bottom: 20px;
}

.modal-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.modal-techs span {
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.14);
    color: #b6f6ff;
}

.modal-section {
    margin-top: 28px;
}

.modal-section h3 {
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.modal-gallery img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    object-fit: cover;
}

.modal-video iframe {
    width: 100%;
    min-height: 380px;
    border: none;
    border-radius: 16px;
    background: #000;
}

.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.modal-links a {
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
    transition: 0.3s ease;
}

.modal-links a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* CONTACT */
.contact-box {
    text-align: center;
    padding: 36px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.10), rgba(124, 58, 237, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: var(--shadow);
}

.contact-box p {
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto 22px;
}

footer {
    padding: 26px 0 40px;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

/* REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: 0.7s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 960px) {
    .hero-content,
    .grid-2,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 70px;
    }

    .hero-card {
        max-width: 520px;
    }
}

@media (max-width: 760px) {
    .tech-card-wrapper {
        padding: 26px 18px;
    }

    .tech-selector {
        gap: 22px;
        padding: 20px 56px 14px;
    }

    .tech-class {
        flex: 0 0 130px;
        min-width: 130px;
    }

    .tech-class i {
        font-size: 3.3rem;
    }

    .tech-class span {
        font-size: 0.95rem;
    }

    .tech-arrow {
        width: 44px;
        height: 44px;
    }

    .menu-btn {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 78px;
        left: 0;
        width: 100%;
        background: rgba(5, 8, 22, 0.98);
        flex-direction: column;
        align-items: center;
        gap: 18px;
        padding: 24px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .hero-text h1 {
        font-size: 2.4rem;
    }

    .profile-box img {
        width: 135px;
        height: 135px;
    }

    .mini-infos {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 180px;
    }

    .modal-gallery {
        grid-template-columns: 1fr;
    }

    .project-modal-header {
        height: 220px;
    }

    .project-modal-body {
        padding: 22px;
    }

    .project-modal-body h2 {
        font-size: 1.6rem;
    }

    .modal-video iframe {
        min-height: 220px;
    }
}

@media (max-width: 480px) {
    .tech-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-buttons,
    .project-links,
    .modal-links {
        flex-direction: column;
    }

    .btn,
    .project-links a,
    .project-detail-btn,
    .modal-links a {
        width: 100%;
        justify-content: center;
    }

    .card,
    .project-content,
    .hero-card,
    .contact-box {
        padding: 22px;
    }
}