/* ===== GLOBAL STYLES & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    scroll-behavior: smooth;
}

:root {
    --primary: #293183;
    --secondary: #D8154C;
    --accent: #E0E0E0;
    --dark: #1a1a1a;
    --light: #FFFFFF;
    --transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --section-padding: 120px 5%;
}

body {
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(41, 49, 131, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(216, 21, 76, 0.08) 0%, transparent 25%);
    z-index: -1;
}

/* ===== NAVIGATION ===== */
.nav-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 40px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

header {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
}

nav ul li a {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
}

nav ul li a:hover {
    color: var(--secondary);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

.contact-btn {
    background: linear-gradient(90deg, var(--primary) 0%, #1a2463 100%);
    color: var(--light);
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(41, 49, 131, 0.2);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(41, 49, 131, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--light);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    height: 100vh;
    width: 300px;
    background: rgba(217, 43, 136, 0.382);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 100px 30px 30px;
    transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav ul li a {
    text-decoration: none;
    color: var(--light);
    font-weight: 600;
    font-size: 18px;
    padding: 10px 15px;
    display: block;
    border-radius: 8px;
    transition: var(--transition);
}

.mobile-nav ul li a:hover {
    background: rgba(41, 49, 131, 0.2);
    color: var(--light);
}

.mobile-contact-btn {
    margin-top: 30px;
    background: linear-gradient(90deg, var(--primary) 0%, #1a2463 100%);
    color: var(--light);
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(41, 49, 131, 0.2);
}

.mobile-contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(41, 49, 131, 0.3);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 99;
}

.overlay.active {
    display: block;
}

/* ===== CLOSE BUTTON - CORRECTED RESPONSIVE STYLES ===== */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    transition: var(--transition);
}

.close-btn:hover {
    background: var(--secondary);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(216, 21, 76, 0.8);
}

/* ===== HERO SECTION ===== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--section-padding);
    gap: 2rem;
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
}

.hero-left {
    flex: 1;
    z-index: 1;
    max-width: 650px;
}

.intro-small {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.hero-left h1 {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    line-height: 1.15;
    font-weight: 800;
    color: var(--light);
    margin-bottom: 1.5rem;
}

.hero-left h1 .highlight {
    color: var(--secondary);
    position: relative;
}

.hero-left h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 8px;
    background: rgba(216, 21, 76, 0.3);
    z-index: -1;
}

.typed-text {
    color: var(--accent);
    font-size: 1.8rem;
    margin: 1.5rem 0 2.5rem;
    font-weight: 500;
    height: 2.5rem;
    min-height: 2.5rem;
    transition: opacity 0.4s ease;
}

.typed-text span {
    color: var(--secondary);
}

.hero-left p {
    color: var(--accent);
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.btn-group {
    display: flex;
    gap: 1.5rem;
    z-index: 1;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(135deg, var(--primary), #1a2259);
    color: var(--light);
    padding: 1rem 2.2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(41, 49, 131, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(41, 49, 131, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--light);
    color: var(--light);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-right {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    z-index: 1;
    max-width: 600px;
}

.profile-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.profile-img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
    border: 3px solid rgba(255, 255, 255, 0.05);
}

.profile-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    top: 20px;
    left: 20px;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

.dots {
    position: absolute;
    top: 80px;
    right: -60px;
    z-index: 3;
    animation: rotate 20s linear infinite;
}

.dots span {
    display: block;
    width: 20px;
    height: 20px;
    background: var(--secondary);
    border-radius: 50%;
    position: absolute;
}

.dots span:nth-child(1) {
    top: 0;
    left: 0;
}

.dots span:nth-child(2) {
    top: 0;
    right: 0;
}

.dots span:nth-child(3) {
    bottom: 0;
    left: 0;
}

.dots span:nth-child(4) {
    bottom: 0;
    right: 0;
}

/* ===== ABOUT SECTION ===== */
.portfolio-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--section-padding);
    position: relative;
}

.portfolio-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(200, 200, 200, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(150, 150, 150, 0.03) 0%, transparent 25%);
    z-index: -1;
}

.container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.profile-card {
    background: rgba(25, 25, 25, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 1000px;
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.profile-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent,
            rgba(168, 239, 255, 0.1),
            transparent 30%);
    animation: rotate 6s linear infinite;
    z-index: -1;
}

.profile-column {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.content-column {
    flex: 2;
    min-width: 280px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.name {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    position: relative;
    background: linear-gradient(90deg, var(--light), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
}

.name::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 2px;
}

.about-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin: 20px 0 10px;
    color: var(--secondary);
    position: relative;
    display: inline-block;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 2px;
}

.roles {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 30px;
    font-weight: 400;
    color: var(--accent);
    text-align: justify;
}

.position {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--secondary);
    letter-spacing: 1px;
    margin: 20px 0;
    font-style: italic;
    line-height: 1.6;
    text-align: center;
}

.position span {
    color: var(--light);
    font-weight: 600;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.3);
}

.social-link.linkedin:hover {
    background: linear-gradient(135deg, #0077B5, #00A0DC);
}

.social-link.github:hover {
    background: linear-gradient(135deg, #333, #6e5494);
}

.social-link.behance:hover {
    background: linear-gradient(135deg, #1769ff, #0057ff);
}

.social-link.instagram:hover {
    background: linear-gradient(135deg, #405DE6, #833AB4, #C13584, #E1306C, #FD1D1D);
}

.decoration {
    position: absolute;
    opacity: 0.05;
    z-index: -1;
}

.circle-1 {
    top: 10%;
    left: 10%;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--secondary);
}

.circle-2 {
    bottom: 15%;
    right: 10%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px dashed var(--primary);
    animation: rotate 30s linear infinite;
}

.pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 48%, rgba(216, 21, 76, 0.03) 50%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(41, 49, 131, 0.03) 50%, transparent 52%);
    background-size: 50px 50px;
    opacity: 0.1;
    z-index: -1;
}

.profile-photo {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    margin: 0 auto 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 3px solid transparent;
    background: linear-gradient(135deg, var(--primary), #1a2259);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: borderAnimation 3s infinite alternate;
}

.profile-photo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
            var(--primary),
            var(--secondary),
            #6a11cb,
            var(--primary));
    background-size: 300% 300%;
    border-radius: 50%;
    z-index: -1;
    animation: gradientAnimation 4s ease infinite;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    z-index: 1;
}

.video-btn {
    background: linear-gradient(135deg, var(--primary), #1a2259);
    color: var(--light);
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(41, 49, 131, 0.4);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
}

.video-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.video-btn:hover::before {
    left: 100%;
}

.video-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(216, 21, 76, 0.6);
    background: linear-gradient(135deg, var(--secondary), #a8123d);
}

.video-btn i {
    font-size: 1.4rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(216, 21, 76, 0.5);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
}

.info-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(30, 30, 30, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--secondary);
    font-weight: 600;
}

.info-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item i {
    color: var(--secondary);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* ===== CERTIFICATES SECTION ===== */
.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin: 60px 0 40px;
    background: linear-gradient(to right, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    padding: 0 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
}

.certificates-section {
    position: relative;
    padding: 40px 0;
}

.cards-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.cards-track {
    display: flex;
    gap: 30px;
    padding: 20px 10px;
    position: relative;
    align-items: center;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.cards-track::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.card {
    flex: 0 0 920px;
    height: 550px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: var(--transition);
    opacity: 1;
    transform: translateY(0);
    scroll-snap-align: start;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.card-image {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.mask {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(26, 31, 56, 0.9) 0%, transparent 60%);
    z-index: 2;
}

.cert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

/* ===== SKILLS SECTION ===== */
.skills-section {
    padding: 80px 5vw;
    background: rgba(26, 26, 46, 0.8);
    position: relative;
}

.skills-container {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 25px;
    padding: 40px;
    margin: 0 auto;
    max-width: 1200px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.skills-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
    justify-content: center;
}

.tab-btn {
    padding: 14px 35px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 30px;
    color: var(--light);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
}

.tab-btn:hover,
.tab-btn.active {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(216, 21, 76, 0.3);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.skill-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    opacity: 1;
    transform: translateY(0);
}

.skill-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.skill-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    color: var(--light);
}

.skill-info h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--light);
}

.skill-info p {
    font-size: 0.95rem;
    color: var(--accent);
    line-height: 1.6;
}

.watermark {
    position: absolute;
    bottom: 40px;
    right: 40px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.07);
    font-weight: 800;
    letter-spacing: 3px;
    transform: rotate(-90deg);
    transform-origin: right top;
    text-transform: uppercase;
    user-select: none;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 40px auto;
    max-width: 800px;
}

.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--accent);
    z-index: 100;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.scroll-text {
    margin-bottom: 10px;
    font-weight: 500;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.scroll-icon {
    font-size: 30px;
    animation: bounce 1.5s infinite;
}

/* ===== PROJECTS SECTION ===== */
.section-project {
    padding: 80px 5%;
}

.project-container {
    max-width: 1400px;
    margin: 0 auto;
}

.project-header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 20px;
}

.project-header h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #e6e6e6, #d8154c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.project-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, #d8154c, #293183);
    border-radius: 2px;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 12px 28px;
    background: rgba(41, 49, 131, 0.3);
    color: #e6e6e6;
    border: 2px solid #293183;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn:hover,
.filter-btn.active {
    background: #d8154c;
    color: #e6e6e6;
    border-color: #d8154c;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(216, 21, 76, 0.4);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 35px;
    padding: 20px;
}

.project-card {
    background: rgba(25, 25, 45, 0.95);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: auto;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(216, 21, 76, 0.3);
}

.media-container {
    height: 0;
    padding-bottom: 56.25%;
    /* Ratio 16:9 pour toutes les images */
    position: relative;
    overflow: hidden;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.project-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Assure que l'image remplit le conteneur */
    transition: transform 0.5s ease;
    loading: lazy;
}

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

.project-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 10px;
}

.project-category {
    background: #d8154c;
    color: #e6e6e6;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 400;
    display: inline-block;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(216, 21, 76, 0.3);
}

.project-title {
    font-size: 1rem;
    margin-bottom: 10px;
    color: #e6e6e6;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: #d8154c;
}

.project-desc {
    color: #a0a0b8;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.9rem;
}

.project-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
    /* Pousse les boutons vers le bas */
}

.btn-project {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-project::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.5s ease;
    z-index: -1;
}

.btn-project:hover::before {
    width: 100%;
}

.btn-live {
    background: #293183;
    color: #e6e6e6;
    border: 2px solid #293183;
}

.btn-live:hover {
    background: transparent;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(41, 49, 131, 0.4);
}

.btn-code {
    background: rgba(255, 255, 255, 0.1);
    color: #a0a0b8;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-code:hover {
    background: transparent;
    border-color: #d8154c;
    color: #e6e6e6;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(216, 21, 76, 0.3);
}

.project-counter {
    text-align: center;
    margin-top: 30px;
    font-size: 1.1rem;
    color: #a0a0b8;
}

.counter-highlight {
    color: #d8154c;
    font-weight: bold;
    font-size: 1.3rem;
}

/* ===== CONTACT SECTION ===== */
#contact {
    padding: var(--section-padding);
    position: relative;
}

.contact-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.contact-header {
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

.contact-header h2 {
    color: var(--light);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.contact-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 2px;
}

.contact-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    width: 100%;
    margin-top: 20px;
}

.envelope-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 360px;
    perspective: 2000px;
    cursor: pointer;
    flex-shrink: 0;
}

.envelope-base {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, #1a2463 100%);
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(41, 49, 131, 0.4);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.envelope-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(36px, 8vw, 48px);
    color: rgba(255, 255, 255, 0.9);
    transition: opacity 0.3s ease;
    z-index: 5;
}

.envelope-icon svg {
    width: clamp(48px, 10vw, 64px);
    height: clamp(48px, 10vw, 64px);
}

.click-hint {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.envelope-base::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, #b81441 100%);
    border-radius: 20px 20px 0 0;
    transform-origin: bottom;
    transition: transform 0.8s cubic-bezier(0.45, 0, 0.55, 1);
    transform-style: preserve-3d;
    overflow: hidden;
}

.envelope-flap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.15));
}

.contact-card {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(20px) saturate(180%);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
    z-index: 10;
}

.contact-card.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.contact-card-content {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vw, 1.5rem);
    height: 100%;
}

.contact-card-title {
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    font-weight: 600;
    color: white;
    text-align: center;
}

.contact-card-input {
    width: 100%;
    padding: clamp(12px, 3vw, 16px) clamp(15px, 3vw, 20px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e0e0e0;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    transition: all 0.3s ease;
    outline: none;
}

.contact-card-input:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(216, 21, 76, 0.3);
}

.contact-card-button {
    padding: clamp(12px, 3vw, 16px);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(41, 49, 131, 0.5);
}

.contact-card-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(41, 49, 131, 0.7);
}

.sent-animation {
    animation: floatAway 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.form-messages {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    opacity: 0;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.success {
    color: var(--accent);
}

.error {
    color: var(--secondary);
}

.envelope-container.open .envelope-icon,
.envelope-container.open .click-hint {
    opacity: 0;
}

.particle {
    position: absolute;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    pointer-events: none;
    animation: particleAnim 1.5s ease-out forwards;
    z-index: 100;
}

.contact-info {
    max-width: 480px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-info-title {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: white;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.contact-info-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
    border-radius: 2px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--secondary);
}

.contact-details h3 {
    color: white;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-bottom: 5px;
}

.contact-details p {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 40px;
    text-align: center;
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-overlay.active .popup-content {
    transform: translateY(0);
    opacity: 1;
}

.popup-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    position: relative;
}

.popup-icon .circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(75, 181, 67, 0.1);
    animation: pulse 2s infinite;
}

.popup-icon .checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #4BB543;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-icon .checkmark svg {
    width: 40px;
    height: 40px;
    stroke-width: 3;
    stroke: white;
}

.popup-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 15px;
    font-weight: 700;
}

.popup-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.popup-button {
    padding: 14px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(41, 49, 131, 0.4);
}

.popup-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(41, 49, 131, 0.6);
}

/* ===== FOOTER ===== */
.top-curve {
    background-color: var(--primary);
    border-bottom-left-radius: 50%;
    border-bottom-right-radius: 50%;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--light);
}

.top-curve h2 {
    font-weight: normal;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.top-curve p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    color: var(--light);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
}

.footer-col {
    background-color: var(--light);
    color: var(--dark);
    padding: 1.5rem;
    border-radius: 1.5rem;
    font-size: 1rem;
}

.footer-col h4 {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.footer-logo-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: auto;
}

.footer-logo {
    background-color: var(--primary);
    border-radius: 2rem;
    padding: 2rem 3rem;
    font-size: 2.5rem;
    color: var(--light);
}

.footer-icon {
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    font-size: 2rem;
    color: var(--light);
}

.footer-bottom {
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
    background-color: var(--primary);
    color: var(--light);
}

.qr-code {
    width: 157.2px;
    margin-top: -0.1rem;
    border-radius: 1px;
}

/* ===== ANIMATIONS ===== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes borderAnimation {
    0% {
        border-color: var(--primary);
        box-shadow: 0 0 15px var(--primary);
    }

    50% {
        border-color: var(--secondary);
        box-shadow: 0 0 25px var(--secondary);
    }

    100% {
        border-color: #6a11cb;
        box-shadow: 0 0 35px #6a11cb;
    }
}

@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

@keyframes floatAway {
    0% {
        transform: translateY(0) rotate(-5deg);
        opacity: 1;
        filter: blur(0);
    }

    100% {
        transform: translateY(-800px) rotate(720deg);
        opacity: 0;
        filter: blur(10px);
    }
}

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

    100% {
        opacity: 0;
        transform: translate(var(--tx), var(--ty)) scale(0);
    }
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1024px) {
    .hero {
        padding: 120px 5% 60px;
        gap: 30px;
    }

    .hero-left h1 {
        font-size: clamp(2.2rem, 5vw, 3.5rem);
    }

    .typed-text {
        font-size: 1.6rem;
    }
}

@media (max-width: 900px) {

    nav ul,
    .contact-btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    header {
        padding: 12px 20px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 24px;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 5% 60px;
    }

    .hero-left,
    .hero-right {
        max-width: 100%;
    }

    .hero-left {
        order: 1;
        margin-bottom: 40px;
    }

    .hero-right {
        order: 0;
        margin-bottom: 30px;
    }

    .btn-group {
        justify-content: center;
    }

    .profile-container {
        max-width: 350px;
    }

    .contact-section {
        gap: 30px;
    }

    .envelope-container {
        height: 320px;
    }

    .profile-card {
        flex-direction: column;
        gap: 20px;
    }

    .profile-column,
    .content-column {
        min-width: 100%;
    }

    .name {
        font-size: 2.5rem;
    }

    .about-title {
        font-size: 2rem;
        text-align: center;
    }

    .about-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .roles {
        text-align: center;
    }

    .position {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .project-header h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 992px) {
    .section-title {
        font-size: 2.4rem;
    }

    .card {
        flex: 0 0 580px;
        height: 500px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .profile-card {
        gap: 30px;
        padding: 30px 25px;
    }

    .profile-column,
    .content-column {
        flex: 100%;
        min-width: 100%;
    }

    .content-column {
        text-align: center;
    }

    .about-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .roles {
        text-align: center;
    }

    .info-content {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .info-item {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 15px 25px 0;
    }

    header {
        padding: 12px 20px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .logo-text {
        font-size: 24px;
    }

    .mobile-nav {
        width: 280px;
    }

    .typed-text {
        font-size: 1.5rem;
    }

    .name {
        font-size: 2.3rem;
    }

    .about-title {
        font-size: 1.8rem;
    }

    .roles {
        font-size: 1rem;
    }

    .position {
        font-size: 1.1rem;
    }

    .profile-card {
        padding: 30px;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .modal-content {
        width: 95%;
    }

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

    .contact-header {
        margin-bottom: 10px;
    }

    .contact-section {
        flex-direction: column;
        align-items: center;
    }

    .envelope-container {
        max-width: 100%;
        height: 300px;
    }

    .contact-info {
        max-width: 100%;
    }

    .popup-content {
        padding: 30px;
    }

    .popup-icon {
        width: 80px;
        height: 80px;
    }

    .popup-icon .checkmark {
        width: 50px;
        height: 50px;
    }

    .popup-icon .checkmark svg {
        width: 30px;
        height: 30px;
    }

    .popup-title {
        font-size: 1.7rem;
    }

    .popup-message {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .card {
        flex: 0 0 520px;
        height: 450px;
    }

    .tab-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .skill-icon {
        width: 60px;
        height: 60px;
        font-size: 1.7rem;
    }

    .mobile-instructions {
        display: block;
    }

    .project-header h2 {
        font-size: 2.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Close button responsive adjustments for tablet */
    .close-btn {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .portfolio-section {
        padding: 60px 15px;
    }

    .container {
        padding: 20px 15px;
    }

    .profile-card {
        padding: 25px 20px;
        gap: 25px;
    }

    .name {
        font-size: 2.4rem;
    }

    .about-title {
        font-size: 1.9rem;
    }

    .profile-photo {
        width: 200px;
        height: 200px;
    }

    .position {
        font-size: 1.2rem;
    }

    .roles {
        font-size: 1rem;
    }

    .info-title {
        font-size: 1.3rem;
    }

    .video-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .circle-1,
    .circle-2 {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 90px 5% 40px;
    }

    .intro-small {
        font-size: 1rem;
    }

    .hero-left h1 {
        font-size: 2.5rem;
    }

    .typed-text {
        font-size: 1.4rem;
        margin: 1rem 0 2rem;
        height: 2rem;
    }

    .hero-left p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .profile-container {
        max-width: 280px;
    }

    .dots {
        display: none;
    }

    .filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .project-header h2 {
        font-size: 2.3rem;
    }

    .media-container {
        padding-bottom: 60%;
        /* Ajustement du ratio pour mobile */
    }

    .top-curve h2 {
        font-size: 1.3rem;
    }

    .top-curve p {
        font-size: 0.95rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .footer-logo-grid {
        flex-direction: column;
        align-items: center;
        padding: 1rem;
    }

    .footer-logo {
        font-size: 2rem;
        padding: 1.2rem 2rem;
    }
}

@media (max-width: 576px) {
    .name {
        font-size: 2rem;
    }

    .about-title {
        font-size: 1.7rem;
    }

    .profile-photo {
        width: 180px;
        height: 180px;
    }

    .position {
        font-size: 1.1rem;
    }

    .social-links {
        gap: 15px;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .info-section {
        padding: 15px;
    }

    .info-title {
        font-size: 1.2rem;
    }

    .info-item {
        font-size: 0.95rem;
    }

    .video-btn {
        max-width: 100%;
    }

    .modal-content {
        width: 95%;
    }

    /* Close button responsive adjustments for small mobile */
    .close-btn {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .mobile-nav {
        width: 100%;
        right: -100%;
    }

    .nav-container {
        padding: 10px 15px 0;
    }

    .hero {
        padding: 10rem 5% 3rem;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .typed-text {
        font-size: 1.3rem;
        height: 2rem;
    }

    .name {
        font-size: 2rem;
    }

    .about-title {
        font-size: 1.6rem;
    }

    .roles {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .position {
        font-size: 1rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .profile-photo {
        width: 180px;
        height: 180px;
    }

    .video-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .project-header h2 {
        font-size: 2rem;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .project-buttons {
        flex-direction: column;
    }

    /* Close button responsive adjustments for extra small mobile */
    .close-btn {
        top: 5px;
        right: 5px;
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .envelope-container {
        height: 280px;
    }

    .contact-card {
        padding: 1.2rem;
    }

    .contact-method {
        flex-direction: column;
        align-items: flex-start;
    }

    .popup-content {
        padding: 25px;
    }

    .popup-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .popup-title {
        font-size: 1.5rem;
    }

    .popup-message {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .card {
        flex: 0 0 480px;
        height: 400px;
    }

    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .hero-left h1 {
        font-size: 2.2rem;
    }

    .typed-text {
        font-size: 1.2rem;
    }

    .profile-container {
        max-width: 240px;
    }

    .name {
        font-size: 1.8rem;
    }

    .about-title {
        font-size: 1.5rem;
    }

    .profile-photo {
        width: 160px;
        height: 160px;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .video-btn {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    /* Close button responsive adjustments for very small mobile */
    .close-btn {
        top: 3px;
        right: 3px;
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
}