:root {
    --bg-main: #060608;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Vibrant modern palette */
    --primary: #8b5cf6;
    /* Vibrant Purple */
    --secondary: #06b6d4;
    /* Vibrant Cyan */
    --accent: #f43f5e;
    /* Rose */

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Fira Code', monospace;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    cursor: none;
    /* Hide default for custom cursor */
}

/* Custom Cursor */
.cursor-dot {
    width: 6px;
    height: 6px;
    background-color: var(--secondary);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999999;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(6, 182, 212, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999998;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Background animated shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate;
}

.bg-teal {
    background-color: rgba(6, 182, 212, 0.15);
    width: 600px;
    height: 600px;
    top: -200px;
    left: -200px;
}

.bg-purple {
    background-color: rgba(139, 92, 246, 0.15);
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Typography elements */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass panel utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
    cursor: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    box-shadow: 0 10px 20px -10px var(--primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -10px var(--primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    color: var(--text-main);
    text-decoration: none;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    cursor: none;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--secondary);
    transform: translateY(-3px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(6, 6, 8, 0.8);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    cursor: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Section Header */
.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.section-header .line {
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(90deg, var(--glass-border), transparent);
    max-width: 300px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.greeting {
    color: var(--secondary);
    font-family: var(--font-mono);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.name {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.name span {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2rem;
}

.bio {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
}

.image-wrapper {
    position: relative;
    border-radius: 30px;
    z-index: 1;
}

.image-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 30px;
    filter: blur(30px);
    opacity: 0.5;
    transform: translateZ(-1px);
    z-index: -1;
    transition: var(--transition);
}

.image-wrapper:hover .image-glow {
    opacity: 0.8;
}

.hero-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    aspect-ratio: 1;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.terminal {
    background: #0d1117;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: #161b22;
    padding: 0.8rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close {
    background: #ff5f56;
}

.btn-min {
    background: #ffbd2e;
}

.btn-expand {
    background: #27c93f;
}

.terminal-body {
    padding: 1.5rem;
    color: #c9d1d9;
}

.prompt {
    color: #7ee787;
    margin-right: 0.5rem;
}

.terminal-body pre {
    color: #79c0ff;
    margin: 1rem 0;
}

.typing-anim {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    transition: var(--transition);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

/* Projects Section */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.project-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 0;
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-card:nth-child(even) {
    grid-template-columns: 1fr 1.5fr;
}

.project-card:nth-child(even) .project-img {
    order: 2;
}

.project-img {
    height: 100%;
    min-height: 300px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1e1e24, #2b2b36);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-mono);
    transition: var(--transition);
}

.project-card:hover .placeholder-img {
    transform: scale(1.05);
}

/* Image Carousel for Projects */
.project-img-carousel {
    display: flex;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
    width: 100%;
}

.carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: none;
    font-size: 1.5rem;
    transition: background 0.3s, transform 0.2s;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: none;
    transition: background 0.3s, transform 0.2s;
}

.indicator.active {
    background: var(--primary);
    transform: scale(1.2);
}

.project-info {
    padding: 2.5rem;
}

.project-tech {
    font-family: var(--font-mono);
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.project-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-links {
    display: flex;
    gap: 1rem;
}

/* Contact Section */
.contact-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
}

.contact-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
}

.contact-text {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    text-align: left;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    font-size: 0.95rem;
    text-align: center;
    padding: 0.8rem;
    border-radius: 8px;
    display: none;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background: rgba(39, 201, 63, 0.1);
    color: #27c93f;
    border: 1px solid rgba(39, 201, 63, 0.2);
}

.form-message.error {
    display: block;
    background: rgba(255, 95, 86, 0.1);
    color: #ff5f56;
    border: 1px solid rgba(255, 95, 86, 0.2);
}

/* Social Links Modernized */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 4rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    cursor: none;
    text-decoration: none;
    outline: none;
}

.discord-btn:hover {
    color: #5865F2;
    border-color: #5865F2;
    background: rgba(88, 101, 242, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(88, 101, 242, 0.2);
}

.github-btn:hover {
    color: #ffffff;
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.email-btn:hover {
    color: #f43f5e;
    border-color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(244, 63, 94, 0.2);
}

/* Discord Popup Styles */
.discord-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.discord-popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.discord-popup-content {
    position: relative;
    width: 90%;
    max-width: 350px;
    text-align: center;
    padding: 3rem 2rem;
    transform: scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #18191c;
    /* Discord dark theme match */
    border: 1px solid rgba(88, 101, 242, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.discord-popup-overlay.active .discord-popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: none;
    transition: color 0.2s;
    outline: none;
}

.popup-close:hover {
    color: var(--text-main);
}

.discord-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #18191c;
    box-shadow: 0 0 0 3px #5865F2;
    /* Discord Status Border */
    margin: 0 auto 1rem auto;
    object-fit: cover;
    display: block;
}

.discord-display-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.discord-username-container {
    background: #2b2d31;
    border-radius: 8px;
    padding: 1rem;
    text-align: left;
    width: 100%;
}

.discord-username-label {
    display: block;
    font-size: 0.8rem;
    color: #b5bac1;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.discord-username-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e1f22;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    cursor: none;
    transition: background 0.2s;
}

.discord-username-box:hover {
    background: #111214;
}

.discord-username-box span {
    font-family: var(--font-mono);
    color: var(--text-main);
    font-weight: 500;
}

.copy-icon {
    color: var(--text-muted);
    transition: color 0.2s;
}

.discord-username-box.copied .copy-icon {
    color: #23a559;
    /* Discord green */
}

/* Footer continued */
.w-full {
    width: 100%;
    justify-content: center;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-12 {
    margin-top: 3rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
    color: var(--text-muted);
}

.copyright {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-family: var(--font-mono);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image img {
        max-width: 300px;
    }

    .image-wrapper {
        margin: 0 auto;
        display: inline-block;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .project-card,
    .project-card:nth-child(even) {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .project-card:nth-child(even) .project-img {
        order: 0;
    }

    .nav-links {
        display: none;
        /* simple mobile hide for now, could add a hamburger init */
    }
}

.more-projects-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 5rem;
}

#btn-autre {
    font-size: 1.1rem;
}