/* Design System */
:root {
    --primary-color: #059669; 
    --primary-dark: #047857;  
    --primary-light: #ecfdf5; 
    --secondary-color: #10b981; 
    --text-main: #064e3b;    /* Darker green for text */
    --text-muted: #374151;   
    --bg-white: #ffffff;
    --bg-alt: #f0fdf4;       /* Soft mint background */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    line-height: 1.2;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 5rem 0;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    transition: var(--transition);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    background: radial-gradient(circle at top right, var(--primary-light), transparent 40%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

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

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: 2rem;
    box-shadow: var(--shadow-lg);
}

.hero-image::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border: 4px solid var(--primary-color);
    border-radius: 2rem;
    z-index: -1;
}

/* Section Headlines */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header .line {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: white;
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(5, 150, 105, 0.1);
    transition: var(--transition);
    text-align: center;
    box-shadow: var(--shadow);
    opacity: 1; /* Ensure visible by default */
}

.skill-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.skill-icon {
    font-size: 3rem;
    background: var(--primary-light);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.5rem;
    color: var(--primary-color);
    margin: 0 auto 1.5rem;
    transition: var(--transition);
}

.skill-card:hover .skill-icon {
    background: var(--primary-color);
    color: white;
    transform: rotate(10deg);
}

/* Section Colors */
.section-alt {
    background-color: var(--bg-alt);
}

/* Experience List */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-item {
    margin-bottom: 3rem;
    padding: 2rem 2.5rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    margin-left: 2rem;
    position: relative;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    opacity: 1; /* Ensure visible by default */
}

.timeline-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: -28px;
    top: 2rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-alt);
}

.timeline-date {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 3rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* TikTok Spotlight */
.tiktok {
    position: relative;
    overflow: hidden;
}

.tiktok .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.tiktok img {
    max-width: 400px;
    margin: 0 auto;
    display: block;
}

@media (max-width: 992px) {
    .tiktok .hero-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Form Tweaks */
input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Footer Icons */
footer a {
    font-size: 1.5rem;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-3px);
}

/* TikTok Image Modern Frame */
.dynamic-frame-wrapper {
    position: relative;
    display: inline-block;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.decorative-blob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 60%);
    opacity: 0.2;
    z-index: 0;
    filter: blur(50px);
    animation: blob-pulse 5s infinite alternate ease-in-out;
}

.dynamic-frame {
    width: 100%;
    border-radius: 2.5rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 40px 80px -15px rgba(0,0,0,0.6);
    transition: var(--transition);
    border: 3px solid rgba(255, 255, 255, 0.1);
    animation: image-float 6s ease-in-out infinite;
    display: block;
}

.dynamic-frame:hover {
    transform: scale(1.03) rotate(1deg) translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 50px 100px -20px rgba(5, 150, 105, 0.3);
}

@keyframes image-float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-30px) rotate(-1.5deg); }
    100% { transform: translateY(0px); }
}

@keyframes blob-pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.15; }
    100% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.3; }
}

/* Fix for dark section header visibility */
.tiktok .section-header .line {
    background: #fff;
}

/* Realisations Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    padding: 0 !important;
    overflow: hidden;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* Darker background for 'contain' areas to focus on content */
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.gallery-item img, 
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Beautiful cropped grid by default */
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.gallery-item:hover img,
.gallery-item:hover video {
    object-fit: contain; /* Full uncropped reveal on hover */
    background: #111;
}

.video-card {
    position: relative;
    cursor: pointer;
}

.video-card video {
    background: #000;
}

@media (max-width: 768px) {
    .gallery-item {
        height: 300px;
    }
}

/* About Section Redesign */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    margin: 4rem auto 0;
}

.about-card {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: var(--shadow);
    border-left: 6px solid var(--primary-color);
}

.about-card p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-alt);
    padding: 1.5rem 2rem;
    border-radius: 1.5rem;
    transition: var(--transition);
    border: 1px solid rgba(5, 150, 105, 0.05);
}

.stat-box:hover {
    transform: translateX(10px);
    background: white;
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.stat-box i {
    font-size: 1.8rem;
    color: var(--primary-color);
    background: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.stat-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.stat-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .about-card {
        padding: 2rem;
    }
}

/* --- RESPONSIVE ADJUSTMENTS --- */

.projects-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 2rem;
}

.contact-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

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

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: 0.4s ease-in-out;
        z-index: 999;
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 1rem;
        margin-left: 0 !important;
    }

    .timeline-item {
        margin-left: 1rem;
        padding: 1.5rem;
    }

    .timeline-item::after {
        left: -18px;
    }
}
