/* Responsive Design - Media Queries */
/* Mobile-first responsive breakpoints */

/* ====================
   TABLET & MOBILE (768px and below)
   ==================== */

@media (max-width: 768px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }

    .header {
        padding: 30px 20px;
    }

    /* Improve mobile header layout */
    .header-layout {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .profile-picture {
        width: 120px;
        height: 120px;
        align-self: center;
    }

    .indicator {
        width: clamp(8px, 2vw, 12px);
        height: clamp(8px, 2vw, 12px);
        margin: 0 6px;
    }

    /* Improved mobile slideshow controls */
    .slideshow-controls {
        padding: 20px 15px;
        gap: 15px;
    }

    .slideshow-controls-enhanced {
        padding: 12px 15px;
        gap: 12px;
    }

    /* Better mobile spacing for content */
    .section {
        padding: 25px 20px;
    }

    .section h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }

    /* Optimize mobile slideshow display */
    .slides-wrapper {
        margin-bottom: 15px;
    }

    .slide-caption h4 {
        font-size: 1.1em;
    }

    .slide-caption p {
        font-size: 0.9em;
        line-height: 1.4;
    }

    /* Mobile-optimized video controls */
    .video-container {
        margin: 15px 0;
    }

    .intro-video {
        border-radius: 12px;
    }

    /* Improve mobile modal experience */
    .detail-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
        border-radius: 20px;
    }

    .detail-header {
        padding: 20px 15px;
    }

    .detail-content {
        padding: 0 15px 20px;
    }

    /* Better mobile navigation hints */
    .keyboard-hint {
        font-size: 12px;
        padding: 8px;
        background: rgba(0,0,0,0.1);
        border-radius: 8px;
        margin-top: 10px;
    }

    .text-section {
        text-align: center;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .contact-info {
        gap: 10px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    /* Mobile phone link behavior */
    .phone-mobile {
        display: inline;
        color: inherit;
        text-decoration: none;
    }

    .phone-mobile:hover {
        text-decoration: underline;
    }

    .phone-desktop {
        display: none;
    }

    /* Connect section mobile styles */
    .connect-container {
        max-width: 100%;
    }

    .connect-item {
        padding: 20px;
    }

    .contact-details {
        gap: 10px;
    }

    /* Experience slideshow mobile adjustments */
    .experience-slide.active {
        min-height: 350px;
        padding: 25px 20px;
    }

    .experience-content h3 {
        font-size: 1.5em;
    }

    .experience-content .company {
        font-size: 1.1em;
    }

    .experience-content .description {
        font-size: 1em;
        line-height: 1.6;
    }
}

/* ====================
   EXTRA SMALL MOBILE (480px and below)
   ==================== */

@media (max-width: 480px) {
    .container {
        margin: 5px;
        border-radius: 12px;
    }

    .header {
        padding: 25px 15px;
    }

    .profile-picture {
        width: 100px;
        height: 100px;
    }

    .section {
        padding: 20px 15px;
    }

    .section h2 {
        font-size: 1.6em;
    }

    /* Compact slideshow controls for very small screens */
    .slideshow-controls {
        padding: 15px 10px;
        gap: 10px;
    }

    .progress-container {
        margin: 0 8px;
    }

    .slide-counter {
        font-size: 11px;
        min-width: 35px;
    }

    /* Very small screen back to top button */
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 38px;
        height: 38px;
        font-size: 15px;
    }
}

/* ====================
   LANDSCAPE MOBILE
   ==================== */

@media (max-width: 768px) and (orientation: landscape) {
    .header-layout {
        flex-direction: row;
        gap: 20px;
    }

    .profile-picture {
        width: 80px;
        height: 80px;
    }

    .text-section {
        text-align: left;
    }

    .text-section h1 {
        font-size: 2em;
    }

    .section {
        padding: 20px 25px;
    }
}

/* ====================
   TOUCH DEVICES
   ==================== */

@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .slide-btn:hover,
    .pause-play-btn:hover,
    .indicator:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }

    /* Ensure sufficient spacing for touch */
    .slideshow-controls {
        padding: 18px 20px;
    }

    /* Add visual feedback for touches */
    .slide-btn:active,
    .pause-play-btn:active {
        transform: scale(0.95);
        background: linear-gradient(135deg, #5a6fd8 0%, #6b5b95 100%);
    }
}
