* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Fonts */
@font-face {
    font-family: 'btseps2';
    src: url('../btseps2.TTF') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: '3270NerdFont-Regular';
    src: url('../3270NerdFont-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-light: #000000;
    --bg-dark: #000000;
    --card-light: #000000;
    --card-dark: #000000;
    --text-light: #8B0000;
    --text-dark: #8B0000;
    --accent: #667eea;
}

[data-theme="dark"] {
    --bg: #000000;
    --card: #000000;
    --text: #8B0000;
    --text-secondary: #8B0000;
}

body {
    font-family: '3270NerdFont-Regular', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg, var(--bg-light));
    color: var(--text, var(--text-light));
    min-height: 100vh;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop: Use body2.png as body background */
@media (min-width: 601px) {
    body {
        background: url('../img/body2.webp') center center/cover no-repeat, var(--bg, var(--bg-light));
    }
    .card {
        background: rgba(0, 0, 0, 0.6) !important;
        backdrop-filter: blur(8px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
}

.container {
    max-width: 450px;
    width: 100%;
    height: calc(100vh - 40px);
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.card {
    background: var(--card, var(--card-light));
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.6s ease-out;
    width: 100%;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Animation d'entrée */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.avatar {
    width: 270px;
    height: 270px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    margin-bottom: 20px;
    object-fit: cover;
    transition: all 0.3s ease;
    display: none;
}

.avatar:hover {
    transform: scale(1.05);
}

.name {
    font-family: 'btseps2', '3270NerdFont-Regular', 'Inter', sans-serif;
    font-size: 69px;
    font-weight: 500;
    margin-bottom: 10px;
    margin-top: 35px;
    margin-left: 10px;
    color: #DC143C;
}

.tagline {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 100px;
    line-height: 1.6;
    font-size: 16px;
}

.social-links {
    display: none;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: var(--text);
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
    font-size: 18px;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto;
    padding: 10px 0;
}

.contact-link:hover {
    color: #DC143C;
}

.link {
    display: block;
    padding: 24px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
    position: relative;
    overflow: hidden;
}

.link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.link-title {
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
}

.link-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #DC143C;
    min-width: 24px;
}

.link-description {
    font-size: 14px;
    color: var(--text-secondary, #718096);
    display: none;
}

.link-arrow {
    transition: all 0.3s ease;
}

.link:hover .link-arrow {
    transform: translateX(5px);
}

@media (max-width: 600px) {
    .card {
        padding: 30px 20px;
        background-image: url('../img/sideye.webp');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-color: #000000;
        gap: 25px;
    }
    .link {
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    .link:hover {
        background: rgba(0, 0, 0, 0.6);
    }
    .social-links {
        gap: 10px;
    }
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Enhanced Wine-themed Particles */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particles-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    border-radius: 25px;
    overflow: hidden;
    display: none;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.6), rgba(139, 0, 0, 0.3));
    border-radius: 50%;
    animation: wineFloat 8s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(220, 20, 60, 0.4);
}

/* Default particle size */
.particle {
    width: 6px;
    height: 6px;
}

/* Different particle sizes */
.particle-large {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, rgba(128, 0, 32, 0.7), rgba(75, 0, 130, 0.3));
    box-shadow: 0 0 10px rgba(128, 0, 32, 0.5);
}

.particle-medium {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(220, 20, 60, 0.5), rgba(139, 0, 0, 0.2));
}

.particle-small {
    width: 4px;
    height: 4px;
    background: rgba(220, 20, 60, 0.4);
}

.particle-tiny {
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
    animation: sparkle 3s ease-in-out infinite;
}

.particle-sparkle {
    width: 3px;
    height: 3px;
    background: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    animation: twinkle 4s ease-in-out infinite;
}

/* Particle positions */
.particle:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    top: 70%;
    left: 85%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    top: 30%;
    left: 75%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    top: 60%;
    left: 15%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    top: 25%;
    left: 90%;
    animation-delay: 3s;
}

.particle:nth-child(6) {
    top: 80%;
    left: 25%;
    animation-delay: 5s;
}

.particle:nth-child(7) {
    top: 10%;
    left: 60%;
    animation-delay: 2.5s;
}

.particle:nth-child(8) {
    top: 45%;
    left: 5%;
    animation-delay: 4.5s;
}

/* Enhanced animations */
@keyframes wineFloat {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-15px) translateX(5px) scale(1.1);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-30px) translateX(-3px) scale(0.9);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-20px) translateX(8px) scale(1.05);
        opacity: 0.6;
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

@keyframes twinkle {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.4;
    }
    33% {
        transform: rotate(120deg) scale(1.3);
        opacity: 0.8;
    }
    66% {
        transform: rotate(240deg) scale(0.8);
        opacity: 0.6;
    }
}

/* Mobile visibility - show particles only inside card */
@media (max-width: 600px) {
    body {
        overflow: hidden;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for modern browsers */
    }
    
    .particles-background {
        display: none;
    }
    
    .particles-card {
        display: block;
    }
    
    .container {
        height: 87vh;
        height: 87dvh;
        padding: 0 20px;
        box-sizing: border-box;
        justify-content: center;
        align-items: center;
        margin-top: 15vh;
        margin-bottom: 15vh;
    }
    
    .card {
        position: relative;
        height: 100% !important;
        min-height: unset !important;
        max-height: 87vh !important;
        overflow: hidden;
        padding: 12px;
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
    }
    
    .name {
        font-size: clamp(45px, 9vw, 75px);
        margin-left: 5px;
        text-align: center;
        line-height: 1.1;
        white-space: nowrap;
        width: 100%;
        display: block;
    }
    
    .particle {
        box-shadow: 0 0 8px rgba(220, 20, 60, 0.6);
    }
    
    .particle-large {
        box-shadow: 0 0 12px rgba(128, 0, 32, 0.7);
    }
}
