/*
 * PORTFOLIO RESPONSIVE STYLE SHEET
 * Handles layout adaptations from desktop to tablets and mobile screens.
 */

/* ==========================================
   1. LAPTOPS & TABLETS (1024px - 768px)
   ========================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-roles {
        font-size: 1.5rem;
    }
    
    .focus-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .why-hire-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .skills-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .certs-track .cert-card {
        width: 260px;
    }
    
    .cert-info-content {
        padding: 16px;
        gap: 8px;
    }
    
    .cert-info-content h3 {
        font-size: 0.9rem;
    }
    
    .github-dashboard {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* ==========================================
   2. MOBILE PORTRAT/LANDSCAPE (768px and down)
   ========================================== */
@media (max-width: 768px) {
    /* Hide Custom Cursor on touch devices for better usability */
    .custom-cursor, .custom-cursor-dot {
        display: none !important;
    }

    /* Mobile Header & Burger Navigation */
    .burger-menu {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--nav-height));
        background-color: var(--bg-primary);
        z-index: 1050;
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1), 
                    opacity 0.4s ease, 
                    visibility 0.4s ease;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }
    
    .nav-link {
        font-size: 1.3rem;
        font-weight: 600;
    }
    
    .nav-right {
        gap: 12px;
    }
    
    .clock-display {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    /* Burger animation state */
    .burger-menu.active .burger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .burger-menu.active .burger-bar:nth-child(2) {
        opacity: 0;
    }
    .burger-menu.active .burger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero structure */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }
    
    .focus-grid {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-ctas {
        justify-content: center;
    }
    
    .hero-socials {
        justify-content: center;
    }
    
    .hero-right {
        order: -1; /* Display profile card at the top on mobile */
    }
    
    .profile-card {
        width: 280px;
        margin: 0 auto;
    }

    /* Timeline & About */
    .timeline {
        padding-left: 16px;
        margin-left: 6px;
    }
    
    .timeline-dot {
        left: -25px;
        width: 14px;
        height: 14px;
    }
    
    .about-timeline-right {
        margin-top: 40px;
    }

    /* Skills responsive */
    .skills-wrapper {
        grid-template-columns: 1fr;
    }

    .certs-track .cert-card {
        width: 220px;
    }

    /* Modal adjustments */
    .modal.cert-modal-active .modal-content {
        padding: 16px;
    }
    
    .lightbox-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .lightbox-header h3 {
        font-size: 1.1rem;
    }

    /* Videos */
    .videos-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Contact forms */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .input-group {
        margin-bottom: 20px;
    }

    /* Footer layout */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-brand p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ==========================================
   3. EXTRA SMALL PHONES (480px and down)
   ========================================== */
@media (max-width: 480px) {
    .section-header .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-roles {
        font-size: 1.25rem;
    }
    
    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-ctas .btn {
        width: 100%;
    }
    
    .focus-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-specs {
        grid-template-columns: 1fr;
    }
    
    .why-hire-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-wrapper {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-filter-bar {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        flex-grow: 1;
        text-align: center;
    }
    
    .certs-track .cert-card {
        width: 190px;
    }
    
    .lightbox-viewer-container {
        gap: 8px;
    }
    
    .lightbox-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .lightbox-controls {
        gap: 8px;
    }
    
    .control-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .github-grid {
        grid-template-columns: repeat(12, 1fr);
    }
    
    .modal-content {
        padding: 20px 16px;
        width: 95%;
    }
    
    .modal-project-img {
        font-size: 3rem;
    }
    
    .modal-project-actions {
        flex-direction: column;
    }
    
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
}
