/* =================================
   RESPONSIVE DESIGN FOR RAVENOFDOOM PORTFOLIO
   ================================= */

/* Extra Large Screens (1400px and up) */
@media (min-width: 1400px) {
    .max-w-7xl {
        max-width: 1320px;
    }
    
    .hero-content h1 {
        font-size: 5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* Large Screens (1200px and up) */
@media (min-width: 1200px) {
    .container-xl {
        max-width: 1140px;
    }
    
    .hero-content {
        padding: 0 2rem;
    }
}

/* Desktop (992px and up) */
@media (min-width: 992px) {
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .website-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet Landscape (768px and up) */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-content p {
        font-size: 1.25rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .website-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Navigation */
    .nav-links {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
}

/* Tablet Portrait (576px and up) */
@media (min-width: 576px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .btn-group {
        flex-direction: row;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Landscape (480px and up) */
@media (min-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .carousel-container {
        height: 350px;
    }
    
    .carousel-slide-info {
        padding: 1.5rem;
    }
}

/* Mobile Portrait (Up to 479px) */
@media (max-width: 479px) {
    /* Hero Section */
    .hero-content {
        padding: 1rem;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-content .typewriter {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-content p {
        font-size: 0.875rem;
        margin-bottom: 2rem;
    }
    
    /* Buttons */
    .btn-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-group a {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1.5rem;
    }
    
    /* Skills Grid */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .skill-card {
        padding: 1rem;
    }
    
    .skill-card i {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }
    
    .skill-card h3 {
        font-size: 0.875rem;
    }
    
    /* Gallery */
    .website-gallery,
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .carousel-container {
        height: 280px;
        margin: 0 -1rem;
    }
    
    .carousel-slide-info {
        padding: 1rem;
    }
    
    .carousel-slide-info h3 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem;
    }
    
    .carousel-slide-info p {
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
    
    /* Navigation */
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: inherit;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu a {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    /* Contact Form */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    /* Spacing */
    .section {
        padding: 3rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Typography */
    .section-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    /* Back to top button */
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }
    
    /* Gallery controls */
    .gallery-view-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .gallery-view-toggle button {
        width: 100%;
        padding: 0.75rem;
    }
}

/* Specific Mobile Fixes */
@media (max-width: 320px) {
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .social-links a {
        padding: 0.5rem;
    }
}

/* Landscape Phone */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content .typewriter {
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        margin-bottom: 1.5rem;
    }
    
    .btn-group {
        margin-bottom: 1rem;
    }
    
    .social-links {
        margin-top: 1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .skill-card:hover,
    .project-card:hover,
    .website-card:hover {
        transform: none !important;
    }
    
    /* Increase touch target sizes */
    .nav-link,
    .btn,
    .social-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Simplify animations on touch devices */
    .animate-float,
    .animate-bounce-gentle {
        animation: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    .gradient-text {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    /* Hide unnecessary elements */
    nav,
    .floating-elements,
    .back-to-top,
    .mobile-menu,
    .carousel-controls,
    .particles {
        display: none !important;
    }
    
    /* Optimize layout for print */
    .section {
        break-inside: avoid;
        padding: 1rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        color: #000 !important;
    }
    
    .gradient-text {
        background: none !important;
        color: #000 !important;
        -webkit-text-fill-color: initial !important;
    }
    
    /* Ensure readability */
    * {
        color: #000 !important;
        background: #fff !important;
    }
    
    .skill-card,
    .project-card,
    .website-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    /* Disable animations for users who prefer reduced motion */
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .parallax-element {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .skill-card,
    .project-card,
    .website-card {
        border: 2px solid !important;
    }
    
    .btn {
        border: 2px solid !important;
    }
    
    .gradient-text {
        background: none !important;
        color: #0066cc !important;
        -webkit-text-fill-color: initial !important;
    }
}

/* Dark Mode Specific Responsive Adjustments */
@media (prefers-color-scheme: dark) {
    .hero-video {
        opacity: 0.3;
    }
    
    .glass {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Container Queries (when supported) */
@container (max-width: 500px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}
