/* 
 * Brook Warner Portfolio - Main Stylesheet
 * Production-ready CSS with reusable components
 */

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* ==========================================================================
   Navigation Component
   ========================================================================== */

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

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

.nav-container .nav-logo {
    flex-shrink: 0;
    margin-right: auto;
    order: 1;
}

.nav-container .nav-links {
    flex-shrink: 0;
    margin-left: auto;
    order: 2;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    height: 32px;
    width: auto;
}

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

.nav-links a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #007acc;
}

/* ==========================================================================
   Button Components
   ========================================================================== */

.cta-primary, .cta-secondary {
    padding: 0.75rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-primary {
    background: #007acc;
    color: white;
    border: 2px solid #007acc;
}

.cta-primary:hover {
    background: #005a9e;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 204, 0.3);
    color: white;
}

.cta-secondary {
    background: transparent;
    color: #007acc;
    border: 2px solid #007acc;
}

.cta-secondary:hover {
    background: #007acc;
    color: white;
    transform: translateY(-2px);
}

.cta-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #0077B5;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #0077B5;
}

.cta-linkedin:hover {
    background: #005582;
    border-color: #005582;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.cta-linkedin svg {
    flex-shrink: 0;
}

.submit-btn {
    background: #007acc;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.submit-btn:hover {
    background: #005a9e;
    transform: translateY(-2px);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.carousel-nav-btn {
    background: rgba(0, 122, 204, 0.1);
    color: #007acc;
    border: 1px solid rgba(0, 122, 204, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav-btn:hover {
    background: rgba(0, 122, 204, 0.15);
    border-color: rgba(0, 122, 204, 0.3);
    color: #005a9e;
}

.carousel-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   Video Button and Lightbox
   ========================================================================== */

.cta-video {
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
    border: 2px solid #9333ea;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
}

.cta-video:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.3);
}

.cta-video svg {
    flex-shrink: 0;
}

.video-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.video-lightbox-content {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-lightbox-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #000;
}

.video-lightbox video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 80vh;
}

.video-lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    line-height: 1;
}

.video-lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .video-lightbox-content {
        width: 95vw;
    }
    
    .video-lightbox-wrapper {
        border-radius: 8px;
    }
    
    .video-lightbox video {
        max-height: 70vh;
    }
    
    .video-lightbox-close {
        top: -60px;
        right: 10px;
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }
    
    .cta-video {
        width: 100%;
        max-width: 280px;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    min-height: 90vh;
    padding: 6rem 0 2rem;
    display: flex;
    align-items: center;
}

.hero .container {
    max-width: 1200px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Desktop: left-aligned text */
@media (min-width: 992px) {
    .hero-text {
        text-align: left;
    }
    
    .hero-ctas {
        justify-content: flex-start;
        gap: 1.25rem;
    }
}

/* Mobile: center-aligned text */
@media (max-width: 991px) {
    .hero-text {
        text-align: center;
        margin-bottom: 2rem;
    }
    .hero-ctas {
        justify-content: center;
    }
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.hero-text .subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 2rem;
}

.hero-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    align-items: center;
}

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

.hero-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.hero-social {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.hero-linkedin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(0, 119, 181, 0.1);
    color: #0077B5;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hero-linkedin-link:hover {
    background: #0077B5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.3);
    border-color: #0077B5;
    text-decoration: none;
}

.hero-linkedin-link svg {
    transition: transform 0.3s ease;
}

.hero-linkedin-link:hover svg {
    transform: scale(1.1);
}

/* Portfolio page hero images (img tags with hero-image class) */
img.hero-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* ==========================================================================
   Section Layout
   ========================================================================== */

.section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.section-fullwidth {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 4rem 0;
}

.section-fullwidth .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-fullwidth h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

/* ==========================================================================
   Experience Timeline Component
   ========================================================================== */

.experience-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.experience-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, #007acc, #4fc3f7);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 3rem 0;
    width: 100%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #007acc;
    border: 3px solid white;
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 10px rgba(0, 122, 204, 0.3);
    z-index: 2;
}

.timeline-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.timeline-left,
.timeline-right {
    padding: 1.5rem;
    opacity: 1;
    visibility: visible;
}

/* Ensure both sides are always visible on desktop */
.timeline-item .timeline-left,
.timeline-item .timeline-right {
    opacity: 1;
    visibility: visible;
}

/* No need for grid column positioning - HTML structure now handles alternating pattern naturally */

/* Text alignment for desktop only - keep content readable */
@media (min-width: 769px) {
    /* All content should be left-aligned for readability */
    .timeline-left,
    .timeline-right {
        text-align: left;
    }
    
    /* Only company names should align toward center for visual balance */
    .timeline-item.left .company-info {
        text-align: right; /* Company on left side, align toward center */
    }
    
    .timeline-item.right .company-info {
        text-align: left; /* Company on right side, already left-aligned */
    }
}

.company-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007acc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Company name alignment for desktop only - match text alignment */
@media (min-width: 769px) {
    /* Left timeline items: company info aligns right toward center */
    .timeline-item.left .company-name {
        justify-content: flex-end;
    }

    /* Right timeline items: company info stays left-aligned */
    .timeline-item.right .company-name {
        justify-content: flex-start;
    }
}

.company-logo-timeline {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.company-name a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.company-name a:hover {
    text-decoration: underline;
}

.experience-dates {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.role-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-description {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}

.role-description p {
    margin-bottom: 1rem;
}

.role-description ul {
    list-style: none;
    padding: 0;
}

.role-description li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.role-description li::before {
    content: '→';
    color: #007acc;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ==========================================================================
   Card Components
   ========================================================================== */

.portfolio-card {
    /* Width now controlled by responsive breakpoints below */
    flex-shrink: 0;
    background: linear-gradient(135deg, white 0%, #fafbfc 100%);
    border-radius: 16px;
    padding: 0;
    box-shadow: none;
    transition: all 0.4s ease;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007acc, #4fc3f7, #007acc);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: -200% 0; }
    50% { background-position: 200% 0; }
}

.portfolio-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 122, 204, 0.3);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-card > h3,
.portfolio-card > .company,
.portfolio-card > p,
.portfolio-card > .metrics {
    padding: 0 2.5rem;
}

.portfolio-card > h3 {
    padding-top: 2rem;
}

.portfolio-card > .metrics {
    padding-bottom: 2.5rem;
}

.portfolio-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #333;
    background: linear-gradient(135deg, #333 0%, #007acc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.portfolio-card .company {
    color: #007acc;
    font-weight: 600;
    margin-bottom: 1.25rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.portfolio-card .company-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.portfolio-card p {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-weight: 400;
}

.portfolio-card .metrics {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-card .metric-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.08), rgba(79, 195, 247, 0.08));
    color: #007acc;
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(0, 122, 204, 0.15);
    white-space: nowrap;
    transition: all 0.2s ease;
}

.portfolio-card:hover .metric-tag {
    background: linear-gradient(135deg, rgba(0, 122, 204, 0.12), rgba(79, 195, 247, 0.12));
    border-color: rgba(0, 122, 204, 0.25);
    transform: translateY(-1px);
}

.testimonial-card {
    /* Width now controlled by responsive breakpoints below */
    flex-shrink: 0;
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: none;
    border: 1px solid #e9ecef;
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.testimonial-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 122, 204, 0.2);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    object-fit: cover;
    border: 3px solid rgba(0, 122, 204, 0.1);
    transition: all 0.3s ease;
}

.testimonial-avatar:hover {
    border-color: rgba(0, 122, 204, 0.3);
    transform: scale(1.05);
}

.testimonial-author-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.testimonial-role {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.testimonial-text {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
    font-style: italic;
}

/* ==========================================================================
   Carousel Components
   ========================================================================== */

.portfolio-carousel-container {
    position: relative;
    margin-top: 3rem;
    overflow: hidden;
    padding: 2rem 0;
    width: 100%;
}

.portfolio-carousel-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
}

.portfolio-carousel {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 2rem;
    padding: 1rem 2rem;
    cursor: grab;
    user-select: none;
    will-change: transform;
}

/* BOOTSTRAP CAROUSEL RESPONSIVE SYSTEM */
/* Mobile: 1 card, Tablet: 2 cards, Desktop: 3 cards */

/* Bootstrap Carousel Styling */
.carousel.slide {
    padding: 2rem 0;
}

.carousel-inner {
    padding: 0 60px; /* Space for nav arrows */
}

/* Card responsive sizing */
@media (max-width: 767px) {
    .portfolio-card,
    .testimonial-card {
        width: 100%;
        max-width: 350px;
        flex-shrink: 0;
    }
    
    .carousel-inner {
        padding: 0 20px; /* Smaller padding on mobile */
    }
    
    /* Force hide second and third cards on mobile */
    .carousel-item .portfolio-card.d-none,
    .carousel-item .testimonial-card.d-none,
    .portfolio-card.d-none.d-md-block,
    .testimonial-card.d-none.d-md-block,
    .portfolio-card.d-none.d-xl-block,
    .testimonial-card.d-none.d-xl-block {
        display: none !important;
    }
    
    /* Only show mobile-specific cards */
    .carousel-item .portfolio-card:not(.d-none):first-child,
    .carousel-item .testimonial-card:not(.d-none):first-child {
        display: block !important;
    }
    
    /* Ensure only one card shows on mobile */
    .carousel-item .d-flex {
        overflow: hidden;
        justify-content: center;
    }
}

@media (min-width: 768px) {
    /* Hide mobile-only slides on tablet and desktop */
    .carousel-item.d-md-none {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .portfolio-card,
    .testimonial-card {
        width: 320px;
    }
}

@media (min-width: 1200px) {
    .portfolio-card,
    .testimonial-card {
        width: 350px;
    }
}

/* Custom Bootstrap carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 122, 204, 0.1);
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(0, 122, 204, 0.2);
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Custom indicators */
.carousel-indicators {
    margin-bottom: 0;
    margin-top: 2rem;
}

.carousel-indicators button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(147, 51, 234, 0.25);
    border: none;
    margin: 0 4px;
    padding: 0;
    opacity: 1;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background: rgba(147, 51, 234, 0.6);
}

.portfolio-carousel:active {
    cursor: grabbing;
}

.testimonials-carousel-container {
    position: relative;
    margin-top: 3rem;
    overflow: hidden;
    padding: 2rem 0;
    width: 100%;
}

.testimonials-carousel-viewport {
    overflow: hidden;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
}

.testimonials-carousel {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    gap: 2rem;
    padding: 1rem 2rem;
    cursor: grab;
    user-select: none;
    will-change: transform;
}

.testimonials-carousel:active {
    cursor: grabbing;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: linear-gradient(135deg, #007acc 0%, #4fc3f7 100%);
    transform: scale(1.2);
}

/* ==========================================================================
   Skills Section
   ========================================================================== */

.skills-section {
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    border-top: 1px solid rgba(0, 122, 204, 0.1);
    border-bottom: 1px solid rgba(0, 122, 204, 0.1);
}

.skills-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.skill-pill {
    padding: 0.35rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.skill-pill:hover {
    transform: translateY(-1px);
}

.skills-category {
    margin-bottom: 2rem;
}

.skills-category h4 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
    font-weight: 600;
}

.skills-category .skills-grid {
    margin-top: 1rem;
}

/* Product Management - Blue */
.skills-category:nth-child(2) .skill-pill {
    background: rgba(0, 122, 204, 0.08);
    color: #007acc;
    border: 1px solid rgba(0, 122, 204, 0.15);
}

.skills-category:nth-child(2) .skill-pill:hover {
    background: rgba(0, 122, 204, 0.12);
    border-color: rgba(0, 122, 204, 0.25);
}

/* Research & Analytics - Green */
.skills-category:nth-child(3) .skill-pill {
    background: rgba(34, 197, 94, 0.08);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.15);
}

.skills-category:nth-child(3) .skill-pill:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

/* Leadership & Operations - Purple */
.skills-category:nth-child(4) .skill-pill {
    background: rgba(147, 51, 234, 0.08);
    color: #9333ea;
    border: 1px solid rgba(147, 51, 234, 0.15);
}

.skills-category:nth-child(4) .skill-pill:hover {
    background: rgba(147, 51, 234, 0.12);
    border-color: rgba(147, 51, 234, 0.25);
}

/* Go-to-Market & Enablement - Orange */
.skills-category:nth-child(5) .skill-pill {
    background: rgba(249, 115, 22, 0.08);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.15);
}

.skills-category:nth-child(5) .skill-pill:hover {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.25);
}

/* Platforms & Integrations - Teal */
.skills-category:nth-child(6) .skill-pill {
    background: rgba(20, 184, 166, 0.08);
    color: #14b8a6;
    border: 1px solid rgba(20, 184, 166, 0.15);
}

.skills-category:nth-child(6) .skill-pill:hover {
    background: rgba(20, 184, 166, 0.12);
    border-color: rgba(20, 184, 166, 0.25);
}

/* Tools & Software - Indigo */
.skills-category:nth-child(7) .skill-pill {
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.skills-category:nth-child(7) .skill-pill:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
}

.portfolio-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid rgba(0, 122, 204, 0.1);
    border-bottom: 1px solid rgba(0, 122, 204, 0.1);
}

.testimonials-section {
    background: linear-gradient(135deg, #fafbfc 0%, #f8f9fa 100%);
    border-top: 1px solid rgba(0, 122, 204, 0.1);
}

/* ==========================================================================
   Contact Form Component
   ========================================================================== */

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 4rem;
    border-radius: 12px;
    text-align: center;
}

@media (min-width: 768px) {
    .contact-form {
        padding: 4rem 5rem;
    }
}

@media (min-width: 1024px) {
    .contact-form {
        max-width: 900px;
        padding: 5rem 6rem;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    text-align: center;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    text-align: left;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02), 0 0 0 3px rgba(0, 122, 204, 0.1);
    transform: translateY(-1px);
}

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

/* Form status messages */
.form-status {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
    text-align: center;
}

.form-status.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-status.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.form-status.loading {
    background-color: #e2f3ff;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Thank You Page Styles */
.thank-you-content {
    padding: 2rem 0;
}

.success-icon {
    color: #28a745;
    margin-bottom: 2rem;
    display: inline-block;
}

.thank-you-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.thank-you-content .lead {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 2rem;
}

.thank-you-message {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: left;
}

.thank-you-message p {
    margin-bottom: 1rem;
    color: #555;
}

.thank-you-options {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.thank-you-options li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.thank-you-options li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #007acc;
    font-weight: bold;
}

.thank-you-options a {
    color: #007acc;
    text-decoration: none;
    font-weight: 500;
}

.thank-you-options a:hover {
    text-decoration: underline;
}

.thank-you-actions {
    margin-top: 3rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Footer Component
   ========================================================================== */

.footer {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    color: #666;
    border-top: 1px solid #e9ecef;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #0077B5;
    text-decoration: none;
}

.social-link svg {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* ==========================================================================
   Portfolio-specific styles
   ========================================================================== */

.main {
    padding-top: 6rem;
}

.page-header {
    text-align: center;
    margin: 3rem auto 4rem;
    max-width: 800px;
    padding: 0 2rem;
}

.page-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #333 0%, #007acc 50%, #4fc3f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    padding: 0.2rem 0;
    overflow: visible;
}

.table-of-contents {
    max-width: 1000px;
    margin: 0 auto 3rem;
    text-align: center;
    padding: 0 2rem;
}

/* Responsive table of contents */
@media (min-width: 768px) {
    .toc-container {
        gap: 0.75rem;
        margin-top: 1.5rem;
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .toc-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 6px;
        flex: 0 1 auto;
        min-width: 0;
    }
    
    .toc-link:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 122, 204, 0.12);
    }
}

@media (min-width: 1024px) {
    .toc-container {
        max-width: 1000px;
    }
    
    .toc-link {
        padding: 0.55rem 1.1rem;
        font-size: 0.88rem;
    }
}

@media (min-width: 1200px) {
    .toc-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Mobile table of contents */
@media (max-width: 767px) {
    .table-of-contents {
        margin: 0 auto 2rem;
        padding: 0 1rem;
    }
    
    .toc-container {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .toc-link {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 8px;
    }
}

.toc-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.toc-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, white, #fafbfc);
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
}

.toc-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 204, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 0;
}

.toc-link:hover::before {
    left: 100%;
}

.toc-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 122, 204, 0.15);
    background: linear-gradient(135deg, #007acc, #4fc3f7);
    color: white;
    border-color: rgba(0, 122, 204, 0.3);
}

.floating-toc {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 200px;
}

.floating-toc.active {
    opacity: 1;
    visibility: visible;
}

.floating-toc h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.floating-toc .toc-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0;
}

.floating-toc .toc-link {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: #666;
    transition: all 0.2s ease;
    text-align: left;
}

.floating-toc .toc-link:hover,
.floating-toc .toc-link.active {
    background: linear-gradient(135deg, #007acc, #4fc3f7);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 122, 204, 0.2);
}

/* Case Study Styles - Full Width Sections */
.case-study {
    width: 100%;
    padding: 4rem 0;
    scroll-margin-top: 100px;
    position: relative;
}

.case-study-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Alternating background colors for full-width visual distinction */
.case-study:nth-child(odd) {
    background: #ffffff;
}

.case-study:nth-child(even) {
    background: rgba(248, 250, 252, 0.7);
    border-top: 1px solid rgba(0, 122, 204, 0.08);
    border-bottom: 1px solid rgba(0, 122, 204, 0.08);
}

.case-study-header {
    text-align: center;
    margin-bottom: 3rem;
}

.case-study-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.case-study-company {
    font-size: 1.2rem;
    font-weight: 600;
    color: #007acc;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.company-logo {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.soul-machines-logo {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.bush-base-logo {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.scarlet-city-logo {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.case-study-hero {
    margin: 3rem 0;
    text-align: center;
}


.case-study-section {
    margin: 3rem 0;
}

.case-study-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #007acc;
    display: inline-block;
}

.case-study-section h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #007acc;
    margin: 2rem 0 1rem;
}

.case-study-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #444;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #007acc, #4fc3f7);
    margin: 4rem auto;
    border-radius: 2px;
}

.action-list,
.challenge-list,
.context-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.action-list li,
.challenge-list li,
.context-list li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #444;
}

.action-list li::before,
.challenge-list li::before,
.context-list li::before {
    content: '→';
    color: #007acc;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.action-list li strong,
.challenge-list li strong {
    color: #007acc;
    font-weight: 600;
}

.metrics-block {
    background: rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #007acc;
}

.metrics-block h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.metrics-block p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Image Gallery */
.case-study-images {
    margin: 4rem 0;
}

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

/* Mobile: single column for very small screens */
@media (max-width: 599px) {
    .image-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Responsive image gallery for different screen sizes */
@media (min-width: 600px) {
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 900px) {
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    .image-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1400px) {
    .image-gallery {
        gap: 2.5rem;
    }
}

.image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: #f8f9fa;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-item:hover {
    transform: translateY(-5px);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 122, 204, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.expand-icon {
    color: white;
    font-size: 2rem;
    background: rgba(0, 122, 204, 0.8);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: fit-content;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lightbox-image {
    max-width: 85vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-caption {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    font-size: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Responsive Timeline */
@media (max-width: 768px) {
    .experience-timeline::before {
        left: 30px;
    }

    .timeline-item::before {
        left: 30px;
    }

    .timeline-content {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-left: 60px;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Mobile ordering based on semantic meaning, not structure */
    .company-info {
        order: 1 !important;
        margin-bottom: 1rem;
    }
    
    .role-info {
        order: 2 !important;
    }

    .timeline-left,
    .timeline-right {
        opacity: 1 !important;
        padding: 0;
        text-align: left !important; /* Override desktop alignment for mobile */
    }

    .company-name {
        justify-content: flex-start !important; /* Override desktop alignment for mobile */
    }
}

/* Responsive Cards */
@media (max-width: 992px) {
    .portfolio-card {
        width: calc(50% - 1rem);
    }

    .testimonial-card {
        width: calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .portfolio-card {
        width: calc(100% - 1rem);
        min-width: 280px;
        flex-shrink: 0;
    }

    .testimonial-card {
        width: calc(100% - 1rem);
        min-width: 280px;
        flex-shrink: 0;
    }

    .portfolio-carousel,
    .testimonials-carousel {
        display: flex;
        gap: 1rem;
        scroll-snap-type: x mandatory;
    }

    .portfolio-card,
    .testimonial-card {
        scroll-snap-align: start;
    }
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: #333;
    font-size: 1.5rem;
}

.mobile-menu-toggle:hover {
    color: #007acc;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        justify-content: space-between;
        position: relative;
    }

    .nav-container .nav-logo {
        margin-right: auto;
        order: 1;
    }

    .mobile-menu-toggle {
        display: block;
        order: 3;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        order: 2;
        margin-left: 0;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem;
        border-radius: 6px;
        transition: background-color 0.3s ease;
    }

    .nav-links a:hover {
        background: rgba(0, 122, 204, 0.1);
    }
}

@media (max-width: 768px) {
    /* General mobile improvements */
    body {
        font-size: 16px;
        line-height: 1.6;
    }

    .hero {
        padding: 4rem 1rem 2rem;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero .subtitle {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .hero-text {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }

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

    .cta-primary,
    .cta-secondary {
        width: 100%;
        max-width: 280px;
        min-height: 48px; /* Minimum touch target size */
        font-size: 1rem;
        text-align: center;
        justify-content: center;
    }
    
    .hero-social {
        margin-top: 1rem;
    }
    
    .hero-linkedin-link {
        width: 44px;
        height: 44px;
    }

    /* Improved mobile spacing for sections */
    .section {
        padding: 3rem 1rem;
    }

    .section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .section h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    /* Better mobile carousel card sizing */
    .portfolio-card,
    .testimonial-card {
        margin: 0 0.5rem;
        min-height: 280px;
    }

    /* Improved mobile testimonial cards */
    .testimonial-avatar {
        width: 60px;
        height: 60px;
    }

    .testimonial-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Mobile skills section improvements */
    .skills-container {
        padding: 0 1rem;
    }

    .skill-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        margin: 0.3rem 0.2rem;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Contact form mobile improvements */
    .contact-form {
        padding: 0;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
    }

    .submit-btn {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
    }
    
    /* Thank you page mobile styles */
    .thank-you-content h1 {
        font-size: 2.5rem;
    }
    
    .thank-you-content .lead {
        font-size: 1.25rem;
    }
    
    .thank-you-message {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .thank-you-actions .cta-primary,
    .thank-you-actions .cta-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .hero {
        padding: 6rem 0 3rem;
        min-height: auto;
    }

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

    .hero-image {
        text-align: center;
        margin-bottom: 2rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .contact-form {
        padding: 2rem;
        margin: 0 1rem;
    }

    .hero-ctas {
        justify-content: center;
    }

    .main {
        padding-top: 4rem;
    }

    .floating-toc {
        /* Side tab design */
        width: 280px;
        height: auto;
        padding: 1rem;
        overflow: visible;
        border-radius: 16px 0 0 16px;
        right: 0;
        top: 50%;
        transform: translateY(-50%) translateX(280px); /* Completely off-screen except tab */
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        border-right: none;
    }
    
    .floating-toc.active {
        display: block; /* Always show the structure */
    }
    
    /* Expanded state - slide in */
    .floating-toc.expanded {
        transform: translateY(-50%) translateX(0); /* Slide fully in */
    }
    
    /* Tab handle - mobile only */
    .floating-toc .toc-tab-handle {
        position: absolute;
        left: -40px;
        top: 50%;
        transform: translateY(-50%);
        width: 40px;
        height: 60px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 12px 0 0 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        color: #007acc;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
        border-right: 1px solid rgba(0, 122, 204, 0.1);
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Tab handle hover/active states */
    .floating-toc .toc-tab-handle:hover,
    .floating-toc .toc-tab-handle:active {
        background: rgba(0, 122, 204, 0.1);
        color: #005a9e;
        transform: translateY(-50%) scale(1.05);
    }

/* Desktop: revert to normal floating TOC behavior */
@media (min-width: 769px) {
    .floating-toc {
        /* Reset mobile styles for desktop */
        width: auto !important;
        height: auto !important;
        right: 2rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        border-radius: 16px !important;
        padding: 1.5rem !important;
        box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37) !important;
    }
    
    .floating-toc .toc-tab-handle {
        display: none; /* Hide tab handle on desktop */
    }
}

    .case-study-container {
        padding: 0 1rem;
    }

    .case-study-title {
        font-size: 2rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .toc-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   Image Gallery Component
   ========================================================================== */

.case-study-images {
    margin: 2rem 0;
}

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

.image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.image-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.expand-icon {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .image-item img {
        height: 200px;
    }
}

/* Video Styling for Case Studies */
.video-item {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-caption {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.98);
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .video-item {
        margin-bottom: 1.5rem;
        border-radius: 8px;
    }
    
    .video-caption {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Lightbox Component
   ========================================================================== */

.lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.95) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Ultra-specific lightbox image sizing */
.lightbox #lightbox-image,
#lightbox #lightbox-image,
.lightbox.active #lightbox-image {
    max-width: 80vw !important;
    max-height: 80vh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    display: block !important;
    margin: 0 auto !important;
    position: relative !important;
    transform: none !important;
}

#lightbox-image {
    max-width: 80vw !important;
    max-height: 80vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: block;
    margin: 0 auto;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 1.2rem;
}

.lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    max-width: 80vw;
    text-align: center;
    line-height: 1.4;
}

/* Mobile lightbox improvements */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 90vh;
        margin: 0;
        padding: 10px;
    }

    /* Ultra-specific mobile lightbox image sizing */
    .lightbox #lightbox-image,
    #lightbox #lightbox-image,
    .lightbox.active #lightbox-image {
        max-width: 90vw !important;
        max-height: 70vh !important;
        min-width: 0 !important;
        min-height: 0 !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 6px !important;
        display: block !important;
        margin: 0 auto !important;
        transform: none !important;
    }
    
    #lightbox-image {
        max-width: 90vw !important;
        max-height: 70vh !important;
        border-radius: 6px;
    }

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-caption {
        bottom: 15px;
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        max-width: 90vw;
    }
}
