* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f8f6ff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a142b;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

#loading {
    position: fixed;
    inset: 0;
    background: #f8f6ff;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    transition: opacity 1s ease, visibility 1s ease;
}

#loading.hide {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 44px;
    height: 44px;
    border: 3px solid #e5dcff;
    border-top: 3px solid #7b4dff;
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

.loader-text {
    font-weight: 500;
    color: #7b4dff;
    letter-spacing: 3px;
    font-size: 0.8rem;
    text-transform: uppercase;
    opacity: 0.6;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(248, 246, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(123, 77, 255, 0.08);
    padding: 16px 0;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #1a142b, #7b4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: #1a142b99;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 40px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #7b4dff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link:hover {
    color: #1a142b;
    background: rgba(123, 77, 255, 0.06);
}

.nav-link.active {
    color: #7b4dff;
}

.nav-link.active::after {
    width: 60%;
}

.section {
    padding: 120px 0 80px;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 48px;
    background: linear-gradient(135deg, #1a142b 0%, #7b4dff 50%, #ff6b9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 64px;
    height: 4px;
    background: linear-gradient(90deg, #7b4dff, #ff6b9d);
    border-radius: 4px;
    animation: expandLine 1s ease;
}

@keyframes expandLine {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 64px;
        opacity: 1;
    }
}

#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    opacity: 1;
    transform: translateY(0);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hero-badge {
    display: inline-block;
    background: rgba(123, 77, 255, 0.10);
    padding: 6px 22px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #7b4dff;
    border: 1px solid rgba(123, 77, 255, 0.15);
    width: fit-content;
    margin-bottom: 12px;
    animation: fadeUp 1s ease 0.2s both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-name {
    font-size: clamp(4.8rem, 16vw, 9rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
    background: linear-gradient(135deg, #1a142b 0%, #7b4dff 60%, #ff6b9d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeUp 1s ease 0.4s both;
}

.hero-pseudo {
    font-size: clamp(2rem, 5vw, 3.6rem);
    font-weight: 300;
    color: #3b2b5e;
    letter-spacing: 6px;
    margin-top: -6px;
    opacity: 0.6;
    animation: fadeUp 1s ease 0.6s both;
}

.hero-description {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    font-weight: 400;
    color: #2d2147b3;
    max-width: 580px;
    margin: 16px 0 8px;
    line-height: 1.7;
    animation: fadeUp 1s ease 0.8s both;
}

.hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 10px 0 28px;
    animation: fadeUp 1s ease 1s both;
}

.hero-roles span {
    background: rgba(123, 77, 255, 0.06);
    padding: 8px 22px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(123, 77, 255, 0.10);
    transition: all 0.3s ease;
    color: #1a142bcc;
}

.hero-roles span:hover {
    background: rgba(123, 77, 255, 0.15);
    transform: translateY(-2px) scale(1.05);
    border-color: #7b4dff44;
    box-shadow: 0 8px 24px rgba(123, 77, 255, 0.12);
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
    animation: fadeUp 1s ease 1.2s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    background: #1a142b;
    color: white;
    box-shadow: 0 4px 16px rgba(26, 20, 43, 0.10);
    letter-spacing: 0.2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 48px rgba(123, 77, 255, 0.20);
}

.btn-primary {
    background: linear-gradient(135deg, #7b4dff, #9b6dff);
    border: none;
    box-shadow: 0 8px 32px rgba(123, 77, 255, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #693de0, #8a5aee);
    box-shadow: 0 16px 48px rgba(123, 77, 255, 0.45);
}

.btn-outline {
    background: transparent;
    color: #1a142b;
    border-color: #1a142b22;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(123, 77, 255, 0.06);
    border-color: #7b4dff88;
}

.btn-discord {
    background: linear-gradient(135deg, #5865F2, #4752c4);
    border: none;
    box-shadow: 0 8px 32px rgba(88, 101, 242, 0.30);
    width: 100%;
    justify-content: center;
}

.btn-discord:hover {
    background: linear-gradient(135deg, #4752c4, #3a45b0);
    box-shadow: 0 16px 48px rgba(88, 101, 242, 0.40);
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 740px;
    font-weight: 400;
    color: #2d2147cc;
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(6px);
    padding: 36px 44px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.70);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.02);
    transition: all 0.4s ease;
}

.about-text:hover {
    transform: scale(1.01);
    box-shadow: 0 16px 56px rgba(123, 77, 255, 0.06);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 28px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
    border-radius: 30px;
    padding: 30px 20px 26px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.60);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(123, 77, 255, 0.05), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #b59aff;
    box-shadow: 0 24px 48px rgba(123, 77, 255, 0.12);
    background: rgba(255, 255, 255, 0.75);
}

.skill-name {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.skill-bar {
    width: 100%;
    height: 6px;
    background: #e5dcff;
    border-radius: 12px;
    margin-top: 6px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.skill-fill {
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(90deg, #7b4dff, #ff6b9d);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: #3b2b5e;
    margin-top: 8px;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-card {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
    border-radius: 38px;
    padding: 34px 30px 32px;
    border: 1px solid rgba(255, 255, 255, 0.60);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-card:hover {
    transform: translateY(-12px) scale(1.01);
    border-color: #b59aff;
    box-shadow: 0 40px 80px rgba(123, 77, 255, 0.10);
    background: rgba(255, 255, 255, 0.75);
}

.project-logo {
    max-width: 140px;
    max-height: 70px;
    object-fit: contain;
    margin-bottom: 16px;
    transition: transform 0.4s ease;
}

.project-card:hover .project-logo {
    transform: scale(1.05);
}

.project-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.project-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2d2147b3;
    margin: 8px 0 20px;
}

.project-link {
    background: rgba(123, 77, 255, 0.06);
    padding: 10px 26px;
    border-radius: 40px;
    text-decoration: none;
    color: #1a142b;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(123, 77, 255, 0.10);
    transition: all 0.3s ease;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.project-link:hover {
    background: #7b4dff;
    color: white;
    border-color: #7b4dff;
    box-shadow: 0 8px 24px rgba(123, 77, 255, 0.20);
    transform: translateX(4px);
}

.portfolio-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.portfolio-tab {
    padding: 12px 32px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(123, 77, 255, 0.15);
    background: rgba(255, 255, 255, 0.30);
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: all 0.4s ease;
    color: #1a142b99;
}

.portfolio-tab:hover {
    background: rgba(123, 77, 255, 0.10);
    border-color: #7b4dff66;
    transform: translateY(-2px);
}

.portfolio-tab.active {
    background: linear-gradient(135deg, #7b4dff, #9b6dff);
    color: white;
    border-color: #7b4dff;
    box-shadow: 0 8px 24px rgba(123, 77, 255, 0.30);
}

.portfolio-content {
    display: none;
    animation: fadeContent 0.6s ease;
}

.portfolio-content.active {
    display: block;
}

@keyframes fadeContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
    border-radius: 32px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.60);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    overflow: hidden;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    border-color: #b59aff;
    box-shadow: 0 24px 56px rgba(123, 77, 255, 0.10);
}

.portfolio-item img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    transition: transform 0.5s ease;
}

.portfolio-item:hover img {
    transform: scale(1.04);
}

.portfolio-item .item-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 14px;
    margin-bottom: 4px;
    color: #1a142b;
}

.portfolio-item .item-desc {
    font-size: 0.9rem;
    color: #2d2147b3;
}

.portfolio-item .item-badge {
    display: inline-block;
    background: rgba(123, 77, 255, 0.10);
    padding: 2px 14px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #7b4dff;
    margin-top: 6px;
    border: 1px solid rgba(123, 77, 255, 0.10);
}

.contact-wrapper {
    display: flex;
    gap: 60px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.contact-card {
    background: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(8px);
    padding: 48px 56px;
    border-radius: 48px;
    border: 1px solid rgba(255, 255, 255, 0.70);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.02);
    text-align: center;
    max-width: 540px;
    width: 100%;
    transition: all 0.4s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 56px rgba(123, 77, 255, 0.06);
}

.contact-card h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1a142b, #7b4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-card p {
    font-size: 1.05rem;
    color: #2d2147b3;
    line-height: 1.7;
    margin-bottom: 28px;
}

.contact-discord-name {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.50);
    padding: 16px 24px;
    border-radius: 60px;
    border: 1px solid rgba(123, 77, 255, 0.15);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.discord-label {
    font-weight: 600;
    color: #5865F2;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.discord-username {
    font-weight: 700;
    font-size: 1.3rem;
    color: #1a142b;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s ease;
}

.discord-username:hover {
    color: #7b4dff;
    transform: scale(1.05);
}

.discord-copy-icon {
    cursor: pointer;
    opacity: 0.4;
    transition: 0.3s ease;
    background: none;
    border: none;
    font-size: 0.9rem;
    padding: 4px;
    font-weight: 600;
    color: #1a142b;
}

.discord-copy-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.contact-note {
    font-size: 0.85rem;
    color: #2d214799;
    margin-top: 16px;
    padding: 12px 20px;
    background: rgba(123, 77, 255, 0.06);
    border-radius: 40px;
    border: 1px solid rgba(123, 77, 255, 0.08);
}

.contact-note strong {
    color: #7b4dff;
}

footer {
    padding: 48px 0 36px;
    border-top: 1px solid rgba(123, 77, 255, 0.08);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    color: #2d214799;
    font-size: 0.9rem;
    text-align: center;
}

footer a {
    color: #2d2147;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s ease;
}

footer a:hover {
    color: #7b4dff;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(16px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lightbox.open {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 24px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.60);
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    object-fit: contain;
}

.lightbox.open img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s ease;
    background: none;
    border: none;
}

.lightbox-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    color: rgba(255, 255, 255, 0.30);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.25);
    font-size: 3rem;
    cursor: pointer;
    background: none;
    border: none;
    transition: 0.3s ease;
    padding: 20px;
}

.lightbox-nav:hover {
    color: white;
    transform: translateY(-50%) scale(1.2);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1a142b;
    color: white;
    padding: 14px 32px;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.20);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 100px 0 60px;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-name {
        font-size: clamp(3.2rem, 14vw, 4.8rem);
    }

    .hero-pseudo {
        font-size: clamp(1.4rem, 5vw, 2.4rem);
        letter-spacing: 4px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        gap: 4px;
    }

    .nav-link {
        font-size: 0.7rem;
        padding: 6px 12px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-card {
        padding: 32px 24px;
    }

    .about-text {
        padding: 28px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-name {
        font-size: 2.8rem;
    }

    .hero-roles span {
        font-size: 0.7rem;
        padding: 4px 12px;
    }

    .skill-card {
        padding: 20px 12px 18px;
    }

    .skill-name {
        font-size: 1rem;
    }

    .portfolio-tab {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .lightbox-nav {
        font-size: 2rem;
        padding: 10px;
    }

    .lightbox-nav.prev {
        left: 10px;
    }

    .lightbox-nav.next {
        right: 10px;
    }

    .lightbox-close {
        top: 20px;