/* ============================================
   RESPONSIVE - Media Queries & Breakpoints
   ============================================ */

/* ========== SMALL MOBILE (320px) ========== */
@media (max-width: 479px) {
    :root {
        --text-hero: 2.2rem;
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    /* Hero */
    .hero__rings {
        width: 300px;
        height: 300px;
    }

    .hero__ring--1 {
        width: 120px;
        height: 120px;
    }

    .hero__ring--2 {
        width: 180px;
        height: 180px;
    }

    .hero__ring--3 {
        width: 240px;
        height: 240px;
    }

    .hero__ring--4 {
        width: 300px;
        height: 300px;
    }

    .hero__roles {
        font-size: var(--text-base);
    }

    .hero__cta {
        flex-direction: column;
        gap: var(--space-md);
    }

    .energy-btn {
        width: 100%;
    }

    /* About */
    .about__grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about__stats {
        grid-template-columns: 1fr;
    }

    /* Skills */
    .skills__grid {
        grid-template-columns: 1fr;
    }

    /* Bento Grid */
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-item--large,
    .bento-item--wide {
        grid-column: span 1;
    }

    /* Contact */
    .contact__grid {
        grid-template-columns: 1fr;
    }
}

/* ========== LARGE MOBILE (480px - 767px) ========== */
@media (min-width: 480px) and (max-width: 767px) {
    :root {
        --text-hero: 2.8rem;
    }

    .hero__rings {
        width: 400px;
        height: 400px;
    }

    .hero__ring--1 {
        width: 150px;
        height: 150px;
    }

    .hero__ring--2 {
        width: 230px;
        height: 230px;
    }

    .hero__ring--3 {
        width: 320px;
        height: 320px;
    }

    .hero__ring--4 {
        width: 400px;
        height: 400px;
    }

    .about__grid {
        grid-template-columns: 1fr;
    }

    .about__stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .skills__grid {
        grid-template-columns: 1fr;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-item--large {
        grid-column: span 2;
    }

    .contact__grid {
        grid-template-columns: 1fr;
    }
}

/* ========== TABLET (768px - 1023px) ========== */
@media (min-width: 768px) and (max-width: 1023px) {
    :root {
        --text-hero: 3.5rem;
    }

    .hero__rings {
        width: 550px;
        height: 550px;
    }

    .hero__ring--1 {
        width: 200px;
        height: 200px;
    }

    .hero__ring--2 {
        width: 320px;
        height: 320px;
    }

    .hero__ring--3 {
        width: 440px;
        height: 440px;
    }

    .hero__ring--4 {
        width: 550px;
        height: 550px;
    }

    .about__grid {
        grid-template-columns: 1fr 1fr;
    }

    .skills__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact__grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========== MOBILE NAVIGATION (<1024px) ========== */
@media (max-width: 1023px) {
    .nav__toggle {
        display: flex;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        padding: var(--space-2xl);
        gap: var(--space-2xl);
        border-left: 1px solid var(--glass-border);
        transition: right var(--duration-normal) var(--ease-out);
    }

    .nav__menu.active {
        right: 0;
    }

    .nav__link {
        font-size: var(--text-xl);
    }
}

/* ========== LAPTOP (1024px - 1279px) ========== */
@media (min-width: 1024px) and (max-width: 1279px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bento-item--large {
        grid-column: span 2;
    }
}

/* ========== DESKTOP (1280px - 1919px) ========== */
@media (min-width: 1280px) {
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== ULTRA-WIDE (1920px+) ========== */
@media (min-width: 1920px) {
    :root {
        --text-hero: 5rem;
        --text-5xl: 3.5rem;
    }

    .container {
        max-width: 1600px;
    }

    .hero__rings {
        width: 1000px;
        height: 1000px;
    }

    .hero__ring--1 {
        width: 350px;
        height: 350px;
    }

    .hero__ring--2 {
        width: 550px;
        height: 550px;
    }

    .hero__ring--3 {
        width: 750px;
        height: 750px;
    }

    .hero__ring--4 {
        width: 950px;
        height: 950px;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero__ring {
        animation: none !important;
    }

    .hero__glow {
        animation: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    :root {
        --cyan-glow: #00ffff;
        --pink-glow: #ff00ff;
        --glass-border: rgba(255, 255, 255, 0.5);
    }

    .glass-card {
        border-width: 2px;
    }
}

/* ========== DARK MODE PREFERENCE (Already dark, but explicit) ========== */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark mode */
}

/* ========== TOUCH DEVICES ========== */
@media (hover: none) and (pointer: coarse) {

    /* Disable hover-only effects for touch */
    .project-card__overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(10, 10, 15, 0.8), transparent 60%);
    }

    .gallery-item:hover img {
        transform: none;
    }

    .energy-btn:hover {
        transform: none;
    }

    .glass-card:hover {
        transform: none;
    }

    /* Increase touch targets */
    .nav__link {
        padding: var(--space-sm) var(--space-md);
    }

    .social-icon {
        width: 48px;
        height: 48px;
    }
}

/* ========== PRINT STYLES ========== */
@media print {

    .nav,
    .hero__rings,
    .hero__scroll,
    .preloader {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card {
        background: white;
        border: 1px solid #ccc;
        backdrop-filter: none;
    }

    .neon-text,
    .text-gradient {
        background: none;
        -webkit-background-clip: unset;
        color: black;
    }
}