* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

#renderCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1.5s ease-out 0.5s forwards;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: #4a4a4a;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1.5s ease-out 1s forwards;
}

.hero .tagline {
    font-size: 1.1rem;
    color: #666666;
    max-width: 600px;
    opacity: 0;
    animation: fadeInUp 1.5s ease-out 1.5s forwards;
}

.section {
    padding: 5rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
    font-size: 2.5rem;
    font-weight: 200;
    margin-bottom: 3rem;
    text-align: center;
    color: #1a1a1a;
}

.bio-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.bio-section p {
    font-size: 1.1rem;
    color: #4a4a4a;
    margin-bottom: 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.8s ease-out forwards;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: #1a1a1a;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.05);
}

.project-card h3 {
    color: #1a1a1a;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: #4a4a4a;
    margin-bottom: 1rem;
}

.project-card .company {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.project-link {
    display: inline-block;
    color: #333333;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.project-link:hover {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
    transform: translateX(5px);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.experience-item {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 3px solid #2c2c2c;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.8s ease-out forwards;
    transition: all 0.3s ease;
}

.experience-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-left-color: #1a1a1a;
    transform: translateX(5px);
}

.experience-item h4 {
    color: #1a1a1a;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.experience-item .company {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.experience-item .duration {
    color: #888888;
    font-size: 0.8rem;
}

.contact-section {
    text-align: center;
    padding: 4rem 0;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1a1a1a;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid #1a1a1a;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contact-link:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.expand-section {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 3rem;
}

.expand-button {
    background: none;
    border: 2px solid #1a1a1a;
    border-radius: 50px;
    padding: 1.2rem 2.5rem;
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.expand-button:hover {
    background: #1a1a1a;
    color: #ffffff;
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.expand-arrow {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.expand-button.expanded .expand-arrow {
    transform: rotate(180deg);
}

.full-history {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    margin-top: 2rem;
}

.full-history.expanded {
    max-height: 3000px;
}

.work-item {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 1.8rem;
    margin-bottom: 1.2rem;
    border-left: 3px solid #666666;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.work-item:hover {
    background: rgba(0, 0, 0, 0.04);
    border-left-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.full-history.expanded .work-item {
    opacity: 1;
    transform: translateY(0);
}

.work-item h4 {
    color: #1a1a1a;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.work-item .company {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.work-item .duration {
    color: #888888;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.work-item .description {
    color: #4a4a4a;
    font-size: 0.9rem;
    line-height: 1.5;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   VIDEO SECTION STYLES
   ============================================ */

.videos-section {
    padding: 5rem 0;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.video-thumbnail:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
    filter: brightness(0.8);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #1a1a1a;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-thumbnail:hover .play-button {
    transform: translate(-50%, -50%) scale(1.15);
    background: rgba(255, 255, 255, 1);
}

/* ============================================
   VIDEO MODAL STYLES
   ============================================ */

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer; /* Indicate clickable area */
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: transparent; /* Remove black background */
    border-radius: 8px;
    overflow: visible;
    pointer-events: none; /* Allow clicks to pass through */
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* Make close button clickable */
}

.video-modal-close:hover {
    transform: rotate(90deg);
    color: #ff4444;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio maintained by padding */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    pointer-events: auto; /* Make video container clickable */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   GALLERY SLIDESHOW STYLES
   ============================================ */

.gallery-section {
    padding: 5rem 0;
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.slideshow-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
}

.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
}

.slideshow-image.active {
    opacity: 1;
    pointer-events: auto;
}

.slideshow-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
    border: none;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slideshow-control:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.slideshow-control.prev {
    left: 20px;
}

.slideshow-control.next {
    right: 20px;
}

.slideshow-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(5px);
}

.slideshow-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slideshow-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.slideshow-dot.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.3);
}

/* ============================================
   MOBILE RESPONSIVE STYLES FOR NEW SECTIONS
   ============================================ */

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .video-modal-content {
        width: 95%;
    }
    
    .video-modal-close {
        top: -40px;
        font-size: 2.5rem;
    }
    
    .slideshow-control {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .slideshow-control.prev {
        left: 10px;
    }
    
    .slideshow-control.next {
        right: 10px;
    }
    
    .slideshow-dots {
        padding: 8px 15px;
        gap: 8px;
    }
    
    .slideshow-dot {
        width: 10px;
        height: 10px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .videos-section {
        padding: 3rem 0;
    }
    
    .gallery-section {
        padding: 3rem 0;
    }
    
    .video-thumbnail {
        border-radius: 8px;
    }
    
    .slideshow-container {
        border-radius: 12px;
    }
}