/* RED Projects & Management - Main Stylesheet */
/* Author: Slim Bahri */
/* Version: 1.0.0 */

/* CSS Variables */
:root {
    --primary: #1E40AF;
    --primary-light: #3B82F6;
    --primary-dark: #1E3A8A;
    --accent: #0EA5E9;
    --dark: #0F172A;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-500: #64748B;
    --gray-600: #475569;
    --white: #FFFFFF;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.logo-abbr {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 800;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

.nav-cta {
    display: none;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--dark);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 1.5rem 4rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 64, 175, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-item h3 {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-item p {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 300px;
    margin: 0 auto;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9375rem;
    border: none;
    cursor: pointer;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.2);
}

.btn-secondary {
    background: white;
    color: var(--dark);
    border: 2px solid var(--gray-100);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.hero-visual {
    order: -1;
}

.hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
    padding: 4rem 1.5rem;
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.about-card {
    position: absolute;
    bottom: -1rem;
    right: 1rem;
    left: 1rem;
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary);
}

.about-card h4 {
    color: var(--primary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.about-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 600;
}

.about-content h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
    color: var(--dark);
}

.about-content > p {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.credential-card {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--gray-100);
    transition: all 0.2s;
}

.credential-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.credential-icon {
    width: 36px;
    height: 36px;
    background: rgba(30, 64, 175, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 1rem;
}

.credential-card h4 {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.credential-card p {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services {
    background: var(--gray-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.service-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-100);
    transition: all 0.3s;
}

.service-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.service-icon {
    width: 44px;
    height: 44px;
    background: rgba(30, 64, 175, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.service-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.service-card p {
    color: var(--gray-500);
    font-size: 0.8125rem;
    line-height: 1.6;
    display: none;
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects {
    background: var(--dark);
    color: white;
}

.projects .section-title {
    color: white;
}

.projects .section-subtitle {
    color: var(--gray-500);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.project-card {
    background: #1E293B;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

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

.project-content {
    padding: 1.5rem;
}

.project-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 64, 175, 0.2);
    color: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.project-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: white;
}

.project-content > p {
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.project-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.project-meta-label {
    font-size: 0.625rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-meta-value {
    font-size: 0.8125rem;
    color: white;
    font-weight: 600;
}

/* ============================================
   EXPERIENCE SECTION
   ============================================ */
.experience {
    background: var(--white);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
}

.timeline-item {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

.timeline-content {
    background: var(--gray-50);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 3px solid var(--primary);
}

.timeline-date {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.timeline-company {
    color: var(--gray-500);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.timeline-desc {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
}

.contact h2 {
    color: white;
    margin-bottom: 0.75rem;
}

.contact > p {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
}

.contact-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-4px);
}

.contact-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: white;
}

.contact-card a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.contact-card a:hover {
    color: var(--accent);
}

.contact-card p {
    font-size: 0.8125rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    color: rgba(255,255,255,0.8);
}

.contact-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--primary);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.contact-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--dark);
    color: var(--gray-500);
    padding: 2rem 1.5rem;
    text-align: center;
}

footer p {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

footer strong {
    color: white;
    font-weight: 700;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet & Desktop (768px+) */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
    
    .nav-cta {
        display: inline-block;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .hero-container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
        gap: 4rem;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-description {
        margin-left: 0;
        margin-right: 0;
    }
    
    .hero-stats {
        margin-left: 0;
        margin-right: 0;
    }
    
    .hero-cta-group {
        flex-direction: row;
        margin: 0;
        max-width: none;
    }
    
    .btn {
        width: auto;
    }
    
    .hero-visual {
        order: 0;
    }
    
    .hero-image {
        height: 450px;
    }
    
    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    .about-image {
        height: 500px;
    }
    
    .about-card {
        left: auto;
        right: -1.5rem;
        bottom: -1.5rem;
        width: 280px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .service-card p {
        display: block;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .project-image {
        height: 240px;
    }
    
    .contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    section {
        padding: 5rem 2rem;
    }
}

/* Large Desktop (1024px+) */
@media (min-width: 1024px) {
    .hero-image {
        height: 550px;
    }
    
    .project-image {
        height: 280px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.project-card,
.credential-card {
    animation: fadeInUp 0.6s ease-out forwards;
}
