/* ===============================================
   HISHAM'S PORTFOLIO - CSS
   Modern, Responsive Design for 2026
   =============================================== */

/* ============ CSS VARIABLES ============ */
:root {
    /* Colors */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 20px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ RESET & BASE STYLES ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ============ UTILITY CLASSES ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

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

.btn-full {
    width: 100%;
}

/* ============ NAVIGATION ============ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.nav-link.cta-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 8px;
}

.nav-link.cta-button::after {
    display: none;
}

.nav-link.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ============ HERO SECTION ============ */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Hero Code Card */
.hero-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
}

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

.code-snippet {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
}

.code-header {
    background: #334155;
    padding: 12px 20px;
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.code-snippet pre {
    padding: 25px;
    overflow-x: auto;
}

.code-snippet code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    color: #e2e8f0;
}

.code-keyword { color: #c792ea; }
.code-class { color: #82aaff; }
.code-string { color: #c3e88d; }
.code-function { color: #ffcb6b; }
.code-comment { color: #546e7a; font-style: italic; }

/* ============ ABOUT SECTION ============ */
.about {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.about-text .lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 25px;
}

.about-highlight {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(16, 185, 129, 0.05));
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    margin-top: 30px;
}

.about-highlight i {
    font-size: 2rem;
    color: var(--primary-color);
}

.about-highlight h4 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.about-highlight p {
    margin: 0;
}

.about-cards {
    display: grid;
    gap: 20px;
}

.info-card {
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-card h4 {
    font-size: 1.125rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.info-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* ============ PROJECTS SECTION ============ */
.projects {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-card.featured {
    grid-column: span 2;
}

.project-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-color), #f97316);
    color: white;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

.project-image {
    height: 280px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-placeholder {
    color: var(--primary-color);
    opacity: 0.3;
}

.project-content {
    padding: 35px;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.tag {
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.project-metrics {
    display: flex;
    gap: 25px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.metric i {
    color: var(--secondary-color);
}

.project-learnings {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 20px;
}

.project-learnings h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.project-learnings ul {
    list-style: none;
    padding-left: 0;
}

.project-learnings li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    font-size: 0.9375rem;
}

.project-learnings li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.project-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.project-link:hover {
    gap: 12px;
}

/* ============ SKILLS SECTION ============ */
.skills {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-category {
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.skill-category-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.skill-category-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.skill-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 50px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 50px;
    transition: width 1s ease;
}

/* ============ CONTACT SECTION ============ */
.contact {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    margin-top: 40px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-card {
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.contact-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-card h4 {
    font-size: 1.125rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.contact-card p,
.contact-card a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

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

.contact-form-wrapper {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ============ FOOTER ============ */
.footer {
    padding: 40px 0;
    background: var(--text-primary);
    color: white;
    text-align: center;
}

.footer-content p {
    margin-bottom: 5px;
    opacity: 0.9;
}

.footer-tagline {
    font-size: 0.875rem;
    opacity: 0.7;
}

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

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image {
        order: -1;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card.featured {
        grid-column: span 1;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

/* Mobile (up to 768px) */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
        --container-padding: 0 16px;
    }
    
    html {
        font-size: 14px;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 40px 0;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Hero */
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .code-snippet pre {
        padding: 15px;
    }
    
    .code-snippet code {
        font-size: 0.75rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    /* About */
    .about-text .lead {
        font-size: 1.125rem;
    }
    
    .about-highlight {
        flex-direction: column;
        padding: 20px;
    }
    
    /* Projects */
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: 25px;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
    
    .project-metrics {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .skill-category {
        padding: 25px;
    }
    
    /* Contact */
    .contact-form-wrapper {
        padding: 25px;
    }
    
    .social-links {
        flex-wrap: wrap;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .project-tags {
        gap: 8px;
    }
    
    .tag {
        font-size: 0.75rem;
        padding: 5px 12px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9375rem;
    }
}

/* ============ PROFILE PHOTO ============ */
.profile-photo-wrapper {
    position: relative;
}

.profile-photo {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
}

/* ============ PROJECT ENHANCEMENTS ============ */
.project-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.project-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

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

.project-link.secondary {
    color: var(--text-secondary);
    font-weight: 500;
}

.project-link.secondary:hover {
    color: var(--primary-color);
}

/* Image Placeholder Styling */
.image-placeholder,
.screenshot-placeholder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.1));
    border: 2px dashed rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    font-weight: 600;
}

.image-placeholder small,
.screenshot-placeholder small {
    display: block;
    margin-top: 10px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-light);
}

/* ============ CASE STUDIES SECTION ============ */
.case-studies {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.case-study {
    background: white;
    border-radius: 20px;
    padding: 50px;
    box-shadow: var(--shadow-lg);
    margin-top: 40px;
}

.case-study-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 30px;
    margin-bottom: 40px;
}

.case-study-title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.case-study-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
}

.case-study-title-wrapper h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.case-study-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
}

.case-study-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.case-study-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.case-study-meta i {
    color: var(--primary-color);
}

/* Case Study Content */
.case-study-content {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.case-study-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.case-study-section h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.case-study-section h4 i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.case-study-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.case-study-list {
    list-style: none;
    padding: 0;
}

.case-study-list li {
    padding: 15px 20px;
    margin-bottom: 12px;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.case-study-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Case Study Stats */
.case-study-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.stat-box {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(16, 185, 129, 0.05));
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.stat-box h5 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-box p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* Tech Stack Visual */
.tech-stack-visual {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.tech-layer {
    padding: 20px 25px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.tech-layer h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tech-layer p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

/* Challenge Grid */
.challenge-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.challenge-item {
    padding: 30px;
    background: white;
    border-radius: 16px;
    border: 2px solid var(--border-color);
    position: relative;
    transition: var(--transition);
}

.challenge-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.challenge-number {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.125rem;
}

.challenge-item h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    margin-top: 10px;
}

.challenge-item p {
    margin-bottom: 10px;
    font-size: 0.9375rem;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.result-card {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(16, 185, 129, 0.05));
    border-radius: 16px;
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.result-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.result-card h5 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.result-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Case Study Images */
.case-study-image {
    margin-top: 30px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.case-study-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Screenshots Grid */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 25px;
}

.screenshot-item {
    text-align: center;
}

.screenshot-item img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 15px;
}

.screenshot-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
}

.screenshot-placeholder {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Learning Cards */
.case-study-section.learnings {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(16, 185, 129, 0.03));
    padding: 40px;
    border-radius: 16px;
}

.learning-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.learning-card {
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary-color);
}

.learning-card h5 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.learning-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.7;
}

/* ============ RESPONSIVE - CASE STUDIES ============ */
@media (max-width: 1024px) {
    .case-study {
        padding: 35px;
    }
    
    .challenge-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .learning-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .case-study {
        padding: 25px;
    }
    
    .case-study-title-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .case-study-title-wrapper h3 {
        font-size: 1.5rem;
    }
    
    .case-study-stats {
        grid-template-columns: 1fr;
    }
    
    .tech-stack-visual {
        font-size: 0.875rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-box h5 {
        font-size: 2rem;
    }
    
    .result-card h5 {
        font-size: 1.75rem;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scroll Animations */
.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading State */
.loading {
    opacity: 0;
}