@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    background-color: #0f172a;
}

.gradient-text {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.project-card {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

.skill-bar {
    transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.floating {
    animation: float 4s ease-in-out infinite;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 4px;
    bottom: -8px;
    left: 20%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    left: -8px;
    top: 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.input-field {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-gradient {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid #3b82f6;
    border-right: 2px solid #3b82f6;
    transform: rotate(45deg);
    margin: -10px;
    animation: scrollAnimation 2s infinite;
}

.scroll-indicator span:nth-child(2) {
    animation-delay: -0.2s;
}

.scroll-indicator span:nth-child(3) {
    animation-delay: -0.4s;
}

@keyframes scrollAnimation {
    0% {
        opacity: 0;
        transform: rotate(45deg) translate(-10px, -10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: rotate(45deg) translate(10px, 10px);
    }
}

.tooltip {
    position: relative;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: #1e293b;
    color: white;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.3s ease;
    z-index: 10;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

/* Modern hamburger menu */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: all 0.3s ease;
}

.hamburger-menu:focus {
    outline: none;
}

.hamburger-line {
    width: 30px;
    height: 3px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: 1px;
}

.hamburger-menu.open .hamburger-line:first-child {
    transform: rotate(45deg);
}

.hamburger-menu.open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger-menu.open .hamburger-line:third-child {
    transform: rotate(-45deg);
}

/* Improved mobile menu */
#mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.show {
    transform: translateY(0);
}

.mobile-menu-item {
    display: block;
    padding: 20px 40px;
    color: #e5e7eb;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 12px;
    margin: 8px 0;
    text-align: center;
    min-width: 200px;
    position: relative;
    overflow: hidden;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s ease;
}

.mobile-menu-item:hover::before {
    left: 100%;
}

.mobile-menu-item:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

/* ── Skills ─────────────────────────────────────────── */

.sk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
@media (max-width: 768px) {
    .sk-grid { grid-template-columns: 1fr; }
}

.sk-wide { grid-column: 1 / -1; }

/* Card */
.sk-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 1.4rem 1.4rem 1.4rem 1.9rem;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sk-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

/* Left accent bar */
.sk-border {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--c, #3b82f6);
    border-radius: 14px 0 0 14px;
}

/* Card header: icon + title */
.sk-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.sk-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c, #3b82f6);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.sk-card:hover .sk-icon {
    background: rgba(255, 255, 255, 0.12);
}

.sk-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #cbd5e1;
}

/* Pills */
.sk-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.sk-pills span {
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 6px;
    padding: 3px 11px;
    cursor: default;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sk-pills span:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}

/* ── Skeleton shimmer for images loading */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.img-skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s infinite linear;
}

/* Placeholder pour l'image de profil */
.profile-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.project-placeholder {
  width: 100%;
  height: 192px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
}

/* ── Timeline (Expérience & Formation) ──────────────── */

.tl-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.tl-heading-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.tl-heading-icon--blue {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.tl-heading-icon--purple {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

.tl-track {
    position: relative;
    padding-left: 1.75rem;
}

.tl-track::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 10px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.35), rgba(139, 92, 246, 0.08));
}

.tl-item {
    position: relative;
    margin-bottom: 1.25rem;
}

.tl-item:last-child {
    margin-bottom: 0;
}

.tl-dot {
    position: absolute;
    left: -1.75rem;
    top: 1rem;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid #334155;
    transform: translateX(1px);
    transition: border-color 0.2s ease;
}

.tl-dot--active {
    background: #3b82f6;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.tl-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    transition: border-color 0.22s ease, transform 0.22s ease;
}

.tl-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.tl-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.tl-card-info { flex: 1; min-width: 0; }

.tl-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #f1f5f9;
    line-height: 1.35;
}

.tl-company {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 3px;
}

.tl-badge {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3px 9px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tl-badge--current {
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.25);
}

.tl-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.65;
    margin-bottom: 0.5rem;
}

.tl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.tl-tags span {
    font-size: 0.68rem;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 2px 8px;
}
