/* ====== RESET ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body{
    background: linear-gradient(135deg, #0c0f17 0%, #151925 100%);
    color: #e6e9f0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ====== HEADER ====== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    background: rgba(12, 15, 23, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(42, 252, 133, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #e6e9f0;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.8rem;
    color: #2afc85;
}

.logo-text {
    background: linear-gradient(90deg, #e6e9f0 0%, #2afc85 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

nav a {
    text-decoration: none;
    color: #c2c6d3;
    transition: color 0.3s ease;
    font-weight: 500;
    position: relative;
    padding: 5px;
}

nav a:hover{
    color: #2afc85;
}

nav a:after{
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: #2afc85;
    transition: width 0.3s ease;
}

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

.menu-toggle {
    cursor: pointer;
    font-size: 1.5rem;
    color: #e6e9f0;
    display: none;
}

/* ===== HERO SECTION ===== */
.hero {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 80px;
    padding: 120px 40px 60px;
    min-height: 100vh;
}

.content {
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 15;
    background: linear-gradient(90deg, #e6e9f0 0%, #2afc85 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    text-shadow: 0 5px 15px rgba(46, 252, 139, 0.3);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #c2c6d3;
    font-weight: 500;
}

p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #c2c6d3;
}

.typing-text {
    position: relative;
    display: inline-block;
    color: #2afc85;
}

.typing-text::after {
    content: "|";
    position: absolute;
    right: -8px;
    color: #2afc85;
    animation: blink 0.7s infinite;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 0.8s;
}

.btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(90deg, #1ed761 0%, #15c46a 100%);
    color: #0c0f17;
    box-shadow: 0 5px 15px rgba(30, 215, 97, 0.4);
}

.btn-primary:hover {
   transform: translateY(-3px);
   box-shadow: 0 8px 20px rgba(30, 215, 97, 0.6);
}

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

.btn-secondary {
    border: 2px solid #2afc85;
    color: #2afc85;
}

.btn-secondary:hover {
    background-color: rgba(42, 252, 133, 0.1);
    transform: translateY(-3px);
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 50px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards 1.1s;
}

.social-icons a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1f2e 0%, #232838 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2afc85;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(42, 252, 133, 0.1);
}

.social-icons a:hover {
    transform: translateY(-5px);
    color: #151925;
    box-shadow: 0 8px 20px rgba(30, 215, 97, 0.3);
}

.social-icons a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1ed761 0%, #2afc85 100%);
    z-index: -1;
    transition: 0.3s;
}

.social-icons a:hover::before {
    opacity: 1;
}

/* ===== PROFILE IMAGE ===== */
.profile-container {
    position: relative;
    width: 300px;
    height: 300px;
}

.profile-img {
    width: 240px;
    height: 240px;
    object-fit: cover;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    z-index: 10;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.4);
    border: 4px solid #0c0f17;
    transition: all 0.5s ease;
}

.profile-img:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.border-outer{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    background: conic-gradient(transparent, #2afc85, transparent, transparent);
    animation: rotate 4s linear infinite;
    z-index: 1;
}

.border-middle{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    background: conic-gradient(transparent, #15c46a, transparent, transparent);
    animation: rotate 3s linear infinite;
    z-index: 2;
}

.border-inner{
    position: absolute;
    top: 50%;
    left: 50%;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    background: conic-gradient(transparent, #1ed761, transparent, transparent);
    animation: rotate 2s linear infinite;
    z-index: 3;
}

.border-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
}

.border-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #151925 0%, #1a1f2e 100%);
    z-index: 5;
}

/* ===== SKILLS ===== */
.skills {
    padding: 100px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.skills h2 {
    text-align: center;
    margin-bottom: 60px;
}

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

.skill-card {
    background: linear-gradient(135deg, #151925 0%, #1a1f2e 100%);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(42, 252, 133, 0.15);
}

.skill-card h3 {
    color: #2afc85;
    margin-bottom: 30px;
    font-size: 1.6rem;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #c2c6d3;
    transition: transform 0.3s ease;
}

.tech-item i {
    font-size: 3rem;
}

.tech-item:hover {
    transform: scale(1.1);
}

/* ===== PROJECTS ===== */
.projects {
    padding: 100px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.projects h2 {
    text-align: center;
    margin-bottom: 60px;
}

.projects-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.project-card {
    background: linear-gradient(135deg, #151925 0%, #1a1f2e 100%);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(42, 252, 133, 0.2);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 30px;
}

.project-content h3 {
    color: #2afc85;
    margin-bottom: 15px;
}

.project-content p {
    font-size: 1rem;
}

.project-tech {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.project-tech span {
    background: rgba(42, 252, 133, 0.1);
    color: #2afc85;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.project-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: nowrap;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.project-actions .btn {
    font-size: 0.95rem;
    padding: 12px 26px;
    white-space: nowrap;
}

/* ===== THESIS + CV SPLIT ===== */
.thesis-cv h2 {
    text-align: center;
    margin-bottom: 60px;
}

.thesis-cv {
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.thesis-cv-wrapper {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.thesis-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #151925 0%, #1a1f2e 100%);
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    min-height: 250px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.thesis-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 45px rgba(42, 252, 133, 0.2);
}


.thesis-card h3 {
    color: #2afc85;
    margin-bottom: 15px;
}

.thesis-card p {
    font-size: 1rem;
    margin-bottom: 25px;
}

.thesis-card-memoire {
    flex: 0 0 48%;
}

.thesis-card-cv {
    flex: 0 0 48%;
}

.thesis-actions {
    display: flex;
    gap: 10px;
}

/* ===== CONTACT ===== */
.contact {
    padding: 100px 40px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact h2 {
    margin-bottom: 20px;
}

.contact-text {
    margin-bottom: 50px;
}

.contact-form {
    background: linear-gradient(135deg, #151925 0%, #1a1f2e 100%);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.form-group {
    margin-bottom: 25px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px 20px;
    border-radius: 30px;
    border: none;
    outline: none;
    background: #0c0f17;
    color: #e6e9f0;
    font-size: 1rem;
}

.contact-form textarea {
    border-radius: 20px;
    resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #6f7485;
}

.contact-form button {
    width: 100%;
    justify-content: center;
    border: 0;
}



/* ===== ANIMATIONS ===== */
@keyframes rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

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

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blink {
    0%, 100%{
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        align-items: center;
        gap : 60px;
        padding: 100px 20px 40px;
    }

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

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

@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    nav ul {
        position: fixed;
        top: 70px;
        left: -100%;
        height: calc(100vh -70px);
        width: 100%;
        background: rgba(12, 15, 23, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: left 0.3s ease;
    }

    nav ul.active {
        left: 0;
    }

    nav a {
        font-size: 1.2rem;
        padding: 15px 0;
    }

    .menu-toggle {
        display: block;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 1.1rem;
    }

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

    .profile-container {
        width: 250px;
        height: 250px;
    }

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

    .border-outer {
        width: 250px;
        height: 250px;
    }

    .border-middle {
        width: 225px;
        height: 225px;
    }

    .border-inner {
        width: 200px;
        height: 200px;
    }

    .border-container::after {
        width: 215px;
        height: 215px;
    }

    .pulse-ring {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.2em;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

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

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

    .border-outer {
        width: 200px;
        height: 200px;
    }

    .border-middle {
        width: 180px;
        height: 180px;
    }

    .border-inner {
        width: 160px;
        height: 160px;
    }

    .border-container::after {
        width: 170px;
        height: 170px;
    }

    .pulse-ring {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 900px) {
    .thesis-card-memoire,
    .thesis-card-cv {
        flex: 0 0 100%;
    }
}