/* Responsive - All breakpoints centralized */

@media (hover: none) and (pointer: coarse) {
    body,
    a,
    button {
        cursor: auto;
    }
    
    .cursor,
    .cursor-follower {
        display: none !important;
    }
    
    .btn {
        min-height: 48px;
        min-width: 48px;
    }
    
    .btn-primary:active {
        transform: scale(0.98);
    }
    
    .btn-primary:active .btn-bg {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .cursor, .cursor-follower {
        display: none;
    }
    body {
        cursor: auto;
    }
    body * {
        cursor: auto !important;
    }
}

/* Large Tablets & Small Desktops (max: 1200px) */
@media (max-width: 1200px) {
    #home {
        padding-bottom: 10rem !important;
    }

    /* Hero */
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 120px var(--space-xl) var(--space-4xl);
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-badge {
        justify-content: center;
    }
    
    .hero-role {
        justify-content: center;
    }
    
    .hero-description {
        margin: 0 auto var(--space-xl);
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-social {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: var(--space-3xl);
    }
    
    .orbit-container {
        display: none;
    }
    
    .floating-badges {
        display: none;
    }
    
    .code-window {
        transform: none;
        animation: none;
    }
    
    /* Section headers */
    .section-header {
        text-align: center;
    }
    
    .section-header::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .scroll-indicator {
        bottom: 1rem !important;
    }

    .title-decoration {
        justify-content: center;
    }
}

/* Tablets (max: 1024px) */
@media (max-width: 1024px) {
    /* Navigation */
    .nav {
        padding: var(--space-md) var(--space-lg);
    }
    
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }
    
    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Contact */
    .contact-layout {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-cta-section {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-cta-buttons {
        justify-content: center;
    }
    
    .footer-terminal {
        width: 100%;
        max-width: 350px;
    }
    
    .footer-main {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2xl);
    }
    
    .footer-brand {
        grid-column: span 2;
        max-width: 100%;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* Small Tablets & Large Phones (max: 768px) */
@media (max-width: 768px) {
    /* Base */
    html {
        font-size: 15px;
    }
    
    section {
        padding: var(--space-3xl) var(--space-lg);
    }
    
    /* Navigation */
    .nav {
        padding: var(--space-sm) var(--space-md);
    }
    
    .nav.scrolled {
        padding: var(--space-sm) var(--space-md);
    }
    
    .mobile-menu {
        max-width: 100%;
        padding: var(--space-2xl);
    }
    
    .mobile-link {
        font-size: 2rem;
    }
    
    .mobile-menu-footer {
        left: var(--space-2xl);
        bottom: var(--space-2xl);
    }
    
    /* Hero */
    .hero {
        padding: 100px var(--space-lg) var(--space-3xl);
        min-height: auto;
    }
    
    .hero-text,
    .hero-text-outline {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-cta .btn {
        justify-content: center;
        width: 100%;
    }
    
    .hero-social {
        flex-wrap: wrap;
    }
    
    .corner-deco {
        display: none;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .code-window {
        max-width: 100%;
    }
    
    .code-content {
        font-size: 0.75rem;
    }
    
    /* Section headers */
    .section-header {
        margin-bottom: var(--space-2xl);
    }
    
    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    /* About */
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .stat-card {
        flex-direction: row;
        justify-content: flex-start;
        gap: var(--space-md);
        text-align: left;
        padding: var(--space-md);
    }
    
    .stat-icon {
        margin-bottom: 0;
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .terminal-body {
        font-size: 0.8rem;
        padding: var(--space-md);
    }
    
    .terminal-output {
        padding-left: var(--space-md);
    }
    
    .interactive-terminal {
        max-height: 550px;
        height: 550px;
    }
    
    .interactive-terminal .terminal-body {
        max-height: 500px;
        height: 500px;
    }
    
    .terminal-input-wrapper {
        padding: var(--space-sm);
    }
    
    .terminal-input {
        font-size: 0.8rem;
    }
    
    .terminal-output .neofetch {
        font-size: 0.5rem;
        overflow-x: auto;
    }
    
    /* Projects */
    .projects-filter {
        gap: var(--space-xs);
    }
    
    .filter-btn {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.7rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .project-card.featured {
        grid-column: span 1;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    /* Skills */
    .skill-category {
        padding: var(--space-lg);
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
    }
    
    .skill-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    
    .skill-card {
        padding: var(--space-md);
    }
    
    .skill-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .skill-emoji {
        font-size: 1.5rem;
    }
    
    .skill-name {
        font-size: 0.8rem;
    }
    
    .skill-level-text {
        font-size: 0.6rem;
        padding: var(--space-2xs) var(--space-sm);
    }
    
    /* Contact */
    .contact-headline {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    .contact-cards {
        gap: var(--space-sm);
    }
    
    .contact-card {
        padding: var(--space-md);
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .contact-form-wrapper {
        padding: var(--space-lg);
    }
    
    /* Footer */
    .footer-cta-section {
        padding: var(--space-3xl) var(--space-lg);
    }
    
    .footer-cta-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .footer-content {
        padding: var(--space-3xl) var(--space-lg) var(--space-lg);
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }
    
    .footer-brand {
        grid-column: span 1;
    }
    
    .footer-col-title {
        justify-content: center;
    }
    
    .footer-nav {
        align-items: center;
    }
    
    .footer-link {
        justify-content: center;
    }
    
    .footer-contact-info {
        align-items: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-lg);
    }
    
    .footer-copyright,
    .footer-made {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-tech-stack {
        justify-content: center;
    }
    
    .back-to-top {
        right: var(--space-md);
        bottom: var(--space-md);
        width: 48px;
        height: 48px;
    }
}

/* Phones (max: 576px) */
@media (max-width: 576px) {
    /* Base */
    section {
        padding: var(--space-2xl) var(--space-md);
    }
    
    /* Navigation */
    .nav {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-dot {
        width: 6px;
        height: 6px;
    }
    
    .nav-cta {
        display: none;
    }
    
    .sound-toggle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .menu-toggle {
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    
    .mobile-menu {
        padding: var(--space-xl) var(--space-md);
    }
    
    .mobile-link {
        font-size: 1.6rem;
        gap: var(--space-sm);
    }
    
    .mobile-link-number {
        font-size: 0.75rem;
    }
    
    .mobile-menu-footer {
        left: var(--space-md);
        bottom: var(--space-xl);
        font-size: 0.75rem;
    }
    
    /* Hero */
    .hero {
        padding: 90px var(--space-md) var(--space-2xl);
    }
    
    .hero-text,
    .hero-text-outline {
        font-size: clamp(2rem, 14vw, 3rem);
        -webkit-text-stroke-width: 1px;
    }
    
    .hero-badge {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .badge-text {
        font-size: 0.65rem;
    }
    
    .title-decoration {
        flex-wrap: wrap;
        justify-content: center;
        font-size: 0.7rem;
    }
    
    .hero-role {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .role-line {
        display: none;
    }
    
    .role-text {
        font-size: 0.9rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .social-link {
        width: 42px;
        height: 42px;
    }
    
    .hero-visual {
        margin-top: var(--space-2xl);
    }
    
    /* Buttons */
    .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.8rem;
    }
    
    .btn-icon svg {
        width: 16px;
        height: 16px;
    }
    
    /* Section headers */
    .section-tag {
        font-size: 0.65rem;
    }
    
    .section-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    /* About */
    .about-image {
        max-width: 280px;
    }
    
    .avatar-ring {
        width: 100px;
        height: 100px;
    }
    
    .avatar-emoji {
        font-size: 3.5rem;
    }
    
    .stat-card {
        padding: var(--space-md);
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.65rem;
    }
    
    .terminal-window {
        border-radius: var(--radius-md);
    }
    
    .terminal-body {
        font-size: 0.7rem;
        padding: var(--space-sm);
    }
    
    .terminal-line {
        flex-wrap: wrap;
    }
    
    .about-tags {
        justify-content: center;
    }
    
    .about-tag {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
    }
    
    .interactive-terminal {
        max-height: 550px;
        height: 550px;
    }
    
    .interactive-terminal .terminal-body {
        max-height: 500px;
        height: 500px;
        padding: var(--space-sm);
        font-size: 0.75rem;
    }
    
    .terminal-input-wrapper {
        padding: var(--space-xs);
        gap: var(--space-xs);
    }
    
    .terminal-input {
        font-size: 0.75rem;
    }
    
    .terminal-input::placeholder {
        font-size: 0.65rem;
    }
    
    .terminal-line {
        flex-wrap: wrap;
        gap: var(--space-2xs);
    }
    
    .terminal-prompt,
    .terminal-path,
    .terminal-command {
        font-size: 0.75rem;
    }
    
    .terminal-output {
        font-size: 0.75rem;
        padding: var(--space-xs) 0 var(--space-sm) var(--space-sm);
    }
    
    .terminal-output .neofetch {
        display: none;
    }
    
    /* Projects */
    .projects-filter {
        justify-content: center;
    }
    
    .filter-btn {
        flex: 0 0 auto;
    }
    
    .project-content {
        padding: var(--space-md);
    }
    
    .project-emoji {
        font-size: 3rem;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-description {
        font-size: 0.85rem;
    }
    
    .tech-tag {
        font-size: 0.6rem;
    }
    
    .project-link {
        font-size: 0.8rem;
    }
    
    .project-number {
        font-size: 2rem;
    }
    
    /* Skills */
    .skill-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xs);
    }
    
    .skill-card {
        padding: var(--space-sm);
    }
    
    .skill-icon-wrapper {
        width: 45px;
        height: 45px;
        margin-bottom: var(--space-sm);
    }
    
    .skill-emoji {
        font-size: 1.3rem;
    }
    
    .skill-name {
        font-size: 0.75rem;
    }
    
    .skill-level-text {
        font-size: 0.55rem;
        padding: 2px var(--space-xs);
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .category-desc {
        font-size: 0.8rem;
    }
    
    /* Contact */
    .contact-headline {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }
    
    .contact-text {
        font-size: 0.9rem;
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2);
    }
    
    .card-arrow {
        display: none;
    }
    
    .contact-form-wrapper {
        padding: var(--space-md);
    }
    
    .form-title {
        font-size: 1.1rem;
    }
    
    .form-input {
        padding: var(--space-sm);
        font-size: 0.9rem;
    }
    
    .btn-submit {
        padding: var(--space-md);
    }
    
    /* Footer */
    .footer-cta-section {
        padding: var(--space-2xl) var(--space-md);
    }
    
    .footer-cta-tag {
        font-size: 0.65rem;
        padding: var(--space-2xs) var(--space-sm);
    }
    
    .footer-cta-title {
        font-size: 1.5rem;
    }
    
    .footer-cta-text {
        font-size: 0.95rem;
    }
    
    .footer-cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .footer-cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-terminal {
        max-width: 100%;
    }
    
    .terminal-content {
        padding: var(--space-md);
        font-size: 0.75rem;
    }
    
    .footer-content {
        padding: var(--space-2xl) var(--space-md) var(--space-md);
    }
    
    .footer-logo {
        font-size: 2.5rem;
    }
    
    .footer-tagline {
        font-size: 0.85rem;
    }
    
    .footer-social-link {
        width: 40px;
        height: 40px;
    }
    
    .footer-col-title {
        font-size: 0.8rem;
    }
    
    .footer-link {
        font-size: 0.85rem;
    }
    
    .footer-contact-item {
        font-size: 0.85rem;
    }
    
    .footer-availability {
        font-size: 0.75rem;
    }
    
    .footer-copyright,
    .footer-made {
        font-size: 0.75rem;
    }
    
    .tech-item {
        font-size: 0.6rem;
        padding: 2px var(--space-xs);
    }
    
    .back-to-top {
        width: 44px;
        height: 44px;
        right: var(--space-sm);
        bottom: var(--space-sm);
    }
}

/* Very Small Phones (max: 480px) */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .footer-cta-title {
        font-size: 1.75rem;
    }
}

/* Very Small Phones (max: 380px) */
@media (max-width: 380px) {
    /* Navigation */
    .logo-text {
        font-size: 1.3rem;
        letter-spacing: 0.05em;
    }
    
    .sound-toggle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .menu-toggle {
        width: 35px;
        height: 35px;
        padding: 8px;
    }
    
    .sound-toggle,
    .menu-toggle {
        width: 32px;
        height: 32px;
    }
    
    .mobile-link {
        font-size: 1.4rem;
    }
    
    /* Hero */
    .hero {
        padding: 80px var(--space-sm) var(--space-xl);
    }
    
    .hero-text,
    .hero-text-outline {
        font-size: 2rem;
    }
    
    .hero-badge {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .role-text {
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .hero-cta .btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.75rem;
    }
    
    .social-link {
        width: 38px;
        height: 38px;
    }
    
    /* About */
    .interactive-terminal .terminal-body {
        max-height: 600px;
    }
    
    .terminal-input {
        font-size: 0.7rem;
    }
    
    .about-image {
        max-width: 240px;
    }
    
    .avatar-emoji {
        font-size: 3rem;
    }
    
    /* Skills */
    .skill-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .skill-card {
        padding: var(--space-xs);
    }
    
    .skill-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .skill-emoji {
        font-size: 1.1rem;
    }
    
    .skill-name {
        font-size: 0.7rem;
    }
    
    .skill-level-text {
        font-size: 0.5rem;
    }
    
    /* Contact */
    .contact-headline {
        font-size: 1.3rem;
    }
    
    /* Footer */
    .footer-cta-title {
        font-size: 1.3rem;
    }
    
    .footer-logo {
        font-size: 2rem;
    }
}

/* Landscape Mode Phones (max: 500px) */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--space-2xl) var(--space-lg);
    }
    
    .hero-visual {
        display: none;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .preloader {
        display: none;
    }
}

/* Easter Eggs (max: 768px) */
@media (max-width: 768px) {
    
    .glitch-text {
        font-size: 2rem;
    }
    
    .popup-content {
        margin: var(--space-md);
        padding: var(--space-xl);
    }
    
    .bottom-secret-content {
        flex-direction: column;
        text-align: center;
        margin: 0 var(--space-md);
    }
    
    .bottom-secret-close {
        position: absolute;
        top: var(--space-sm);
        right: var(--space-sm);
    }
    
    .easter-egg-counter {
        bottom: var(--space-md);
        left: var(--space-md);
        font-size: 0.7rem;
    }
    
    .egg-list-popup {
        padding: var(--space-md);
    }
    
    .egg-popup-content {
        min-width: 200px;
    }
    
    .egg-discovery-toast {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-md);
    }
}

/* Projects Modal (max: 900px) */
@media (max-width: 900px) {
    .modal-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .modal-gallery {
        max-height: 40vh;
    }

    .gallery-main {
        padding: var(--space-lg);
        min-height: 200px;
    }

    .modal-info {
        padding: var(--space-xl);
        max-height: 50vh;
    }
}

/* Projects Modal (max: 600px) */
@media (max-width: 600px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
        border-radius: var(--radius-lg);
    }

    .modal-close {
        top: var(--space-sm);
        right: var(--space-sm);
        width: 36px;
        height: 36px;
    }

    .modal-gallery {
        max-height: 35vh;
    }

    .gallery-main {
        padding: var(--space-md);
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
    }

    .modal-info {
        padding: var(--space-lg);
        gap: var(--space-md);
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-description {
        font-size: 0.85rem;
    }

    .modal-links {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .modal-link {
        justify-content: center;
    }
}

/* Reduced Motion (prefers-reduced-motion: reduce) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles-canvas {
        display: none;
    }
    
    .hero-glow {
        animation: none;
    }
    
    .orbit {
        animation: none;
    }
    
    .badge-pulse {
        animation: none;
    }
    
    .typewriter-cursor {
        animation: none;
    }
}

/* High Contrast Mode (prefers-contrast: high) */
@media (prefers-contrast: high) {
    :root {
        --color-bg-primary: #000000;
        --color-bg-secondary: #0a0a0a;
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
    }
    
    .btn-primary {
        border: 2px solid currentColor;
    }
    
    .project-card,
    .skill-card,
    .contact-card {
        border-width: 2px;
    }
}

/* Print Styles (print) */
@media print {
    .nav,
    .preloader,
    .cursor,
    .cursor-follower,
    .particles-canvas,
    .noise-overlay,
    .scanlines,
    .back-to-top,
    .sound-toggle,
    .hero-visual,
    .scroll-indicator,
    .corner-deco,
    .footer-bg-effects {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero,
    section {
        padding: 20px;
    }
    
    .hero-text,
    .hero-text-outline,
    .section-title {
        color: black !important;
        -webkit-text-stroke: none !important;
        text-shadow: none !important;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}
