/* ================================================
    DESKTOP BREAKPOINT (769px and above)
    - Desktop-specific adjustments
    - Profile photo mobile class hidden
    - Desktop-only layout refinements
   ================================================ */
@media (min-width: 769px) {
    .profile-photo.mobile-visible {
        opacity: 0;
        /* Ensure mobile class doesn't interfere */
    }

    .profile-photo.clicked-visible {
        opacity: 1 !important;
        transform: translateY(-50%) translateX(0) scale(1) !important;
    }
}

/* ================================================
    RESPONSIVE STYLES FOR KRUB.DEV PORTFOLIO
   ================================================ */

/* ================================================
    TABLET BREAKPOINT (768px and below)
    - Logo moves to top and starts reducing size
    - Content adjustments for better tablet experience
    - Social buttons repositioned to bottom center
    - Profile photo becomes fixed and visible on mobile
    - Slightly reduce font and icon sizes
   ================================================ */
@media (max-width: 768px) {
    body {
        padding: 1rem;
        min-height: 100vh;
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .container {
        max-width: 600px;
        width: 95%;
        padding: 2.2rem 1.8rem;
        margin: 0;
        position: relative;
    }

    .logo {
        position: absolute;
        top: -100px;
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        height: 120px;
        right: auto;
    }

    .logo:hover {
        transform: translateX(-50%) perspective(800px) rotateX(0deg) rotateY(0deg) scale(1.25) rotate(15deg) translateZ(15px);
    }

    /* Slightly reduce sizes */
    /* h1 styles moved to more specific breakpoints */

    /* h2 styles moved to more specific breakpoints */

    /* .description styles moved to more specific breakpoints */

    /* .location styles moved to more specific breakpoints */

    /* .soon styles moved to more specific breakpoints */

    .contact-info {
        margin-top: 1rem;
    }

    /* .contact-info p styles moved to more specific breakpoints */

    /* .email styles moved to more specific breakpoints */

    /* Slightly smaller video */
    #rickroll-video video {
        width: 320px;
        height: 190px;
    }

    /* Slightly smaller icons */
    .construction-icons {
        font-size: 1.5rem;
        top: 30px;
        right: 25px;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        top: 18px;
        left: 18px;
    }

    .lang-toggle {
        width: 45px;
        height: 45px;
        font-size: 0.75rem;
        font-weight: 600;
        top: 78px;
        left: 18px;
    }

    .lemon-icon {
        font-size: 1.4rem;
        bottom: 18px;
        left: 18px;
    }

    /* Reposition social buttons to bottom center in tablet */
    .social-buttons {
        position: absolute;
        bottom: -25px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        gap: 15px;
        z-index: 15;
    }

    .social-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    /* Profile photo responsive styles */
    .profile-photo {
        position: fixed;
        top: 30px;
        right: 25px;
        width: 80px;
        height: 80px;
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
        transition: all 0.3s ease;
        pointer-events: none;
        z-index: 150;
    }

    .profile-photo.mobile-visible {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: auto;
    }

    .profile-photo img {
        border: 1.5px solid var(--accent-color);
        box-shadow:
            0 8px 20px rgba(0, 0, 0, 0.3),
            0 4px 10px rgba(0, 0, 0, 0.2),
            0 0 15px rgba(255, 200, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }

    .name-container:hover .profile-photo {
        opacity: 0;
        transform: translateY(-50%) translateX(20px) scale(0.8);
    }

    .name-highlight {
        cursor: pointer;
        user-select: none;
    }

    .construction-icons {
        z-index: 100;
    }
}

/* ================================================
    SMALL TABLET BREAKPOINT (600px and below)
    - Logo and container shrink further
    - Font sizes and paddings reduced
    - Video and icons scale down
    - Social buttons remain centered and adjust size
   ================================================ */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
        width: 95%;
        padding: 2rem 1.5rem;
    }

    .logo {
        width: 100px;
        height: 100px;
        top: -80px;
    }

    h1 {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    /* Smaller video */
    #rickroll-video video {
        width: 280px;
        height: 170px;
    }

    .construction-icons {
        font-size: 1.5rem;
        top: 30px;
        right: 25px;
    }

    .lemon-icon {
        left: 18px;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .lang-toggle {
        width: 40px;
        height: 40px;
        font-size: 0.7rem;
        font-weight: 600;
        top: 73px;
    }

    /* Social buttons remain centered and adjust size */
    .social-btn {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }
}

/* ================================================
    MOBILE BREAKPOINT (480px and below)
    - Layout stacks vertically, more compact
    - Logo and profile photo shrink
    - Video and icons scale for mobile
    - Social buttons remain centered and small
    - Text aligns left for better readability
   ================================================ */
@media (max-width: 480px) {
    body {
        padding: 0.5rem 0.5rem 1rem 0.5rem;
        min-height: 100vh;
        overflow-x: hidden;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding-top: 5rem;
    }

    .container {
        padding: 1.5rem 1rem;
        max-width: 100%;
        width: calc(100% - 1rem);
        margin: 0;
        border-radius: 0.8rem;
        position: relative;
        min-height: auto;
    }

    .logo {
        position: absolute;
        top: -70px;
        left: 50%;
        transform: translateX(-50%);
        width: 90px;
        height: 90px;
        right: auto;
    }

    .logo:hover {
        transform: translateX(-50%) perspective(800px) rotateX(0deg) rotateY(0deg) scale(1.25) rotate(15deg) translateZ(12px);
    }

    .text-content {
        gap: 0.8rem;
        max-width: 100%;
    }

    h1 {
        font-size: 1.6rem;
        letter-spacing: 1px;
        margin-bottom: 0.3rem;
    }

    h2 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .description {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }

    .location {
        font-size: 0.8rem;
        margin-bottom: 1.2rem;
    }

    .soon {
        font-size: 0.85rem;
        padding: 0.5rem 1.2rem;
    }

    .contact-info {
        margin-top: 0.8rem;
    }

    .contact-info p {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .email {
        font-size: 0.8rem;
    }

    /* Smaller video on mobile */
    #rickroll-video {
        bottom: 10px;
        right: 10px;
    }

    #rickroll-video video {
        width: 220px;
        height: 125px;
    }

    .close-video {
        width: 24px;
        height: 24px;
        font-size: 11px;
        top: 6px;
        right: 6px;
    }

    /* Smaller icons on mobile */
    .construction-icons {
        font-size: 1.2rem;
        top: 15px;
        right: 15px;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        top: 10px;
        left: 10px;
    }

    .lang-toggle {
        width: 35px;
        height: 35px;
        font-size: 0.65rem;
        font-weight: 600;
        top: 60px;
        left: 10px;
    }

    .lemon-icon {
        font-size: 1rem;
        bottom: 10px;
        left: 10px;
    }

    /* Social buttons in mobile - smaller and still centered */
    .social-buttons {
        gap: 12px;
    }

    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    h1 {
        text-align: left;
        font-size: 2.4rem;
    }

    h2 {
        text-align: left;
    }

    .profile-photo {
        top: 15px;
        right: 15px;
        width: 90px;
        height: 90px;
    }
}

/* ================================================
    EXTRA SMALL MOBILE BREAKPOINT (400px and below)
    - For iPhone 12 (mine) and similar devices
    - All elements shrink to fit tiny screens
    - Video, icons, and buttons at minimum size
    - Tight spacing for controls and profile photo
   ================================================ */
@media (max-width: 400px) {
    .container {
        padding: 1.2rem 0.8rem;
        width: calc(100% - 0.8rem);
    }

    .logo {
        width: 80px;
        height: 80px;
        top: -60px;
    }

    .description {
        font-size: 0.85rem;
        line-height: 1.35;
    }

    .location {
        font-size: 0.75rem;
    }

    .soon {
        font-size: 0.8rem;
        padding: 0.45rem 1rem;
    }

    .contact-info p {
        font-size: 0.75rem;
    }

    /* Even smaller video */
    #rickroll-video video {
        width: 200px;
        height: 115px;
    }

    /* Adjust icons for tighter spacing */
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        top: 8px;
        left: 8px;
    }

    .lang-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.6rem;
        top: 55px;
        left: 8px;
    }

    .construction-icons {
        font-size: 1.1rem;
        top: 12px;
        right: 12px;
    }

    .lemon-icon {
        font-size: 0.9rem;
        bottom: 8px;
        left: 8px;
    }

    /* Social buttons even smaller */
    .social-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .profile-photo {
        top: 10px;
        right: 10px;
        width: 70px;
        height: 70px;
    }

    h1 {
        font-size: 2.2rem;
        /* Even smaller for tiny screens */
    }
}