/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    touch-action: pan-y;
}

/* Burger Menu Styles */
.burger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.burger div {
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    margin: 5px;
    transition: all 0.3s ease;
}

.burger.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger.toggle .line2 {
    opacity: 0;
}

.burger.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Tablet Styles */
@media (max-width: 1024px) {
    :root {
        --container-width: 100%;
        --header-height: 80px;
    }

    .container {
        padding: 0 30px;
    }

    section {
        padding: 80px 0;
    }

    .navbar {
        padding: 0 30px;
    }

    .hero-content h1 {
        font-size: 5rem;
    }

    .subtitle {
        font-size: 1.2rem;
        letter-spacing: 3px;
    }

    .about-content {
        gap: 40px;
    }

    .about-image {
        height: 400px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 30px;
    }

    .section-header h2 {
        font-size: 2.5rem;
    }
}

/* Mobile Landscape and Small Tablets */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .container {
        padding: 0 20px;
    }

    section {
        padding: 60px 0;
    }

    .navbar {
        padding: 0 20px;
    }

    /* Mobile Navigation */
    .nav-links {
        position: fixed;
        right: -100%;
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        gap: 30px;
        transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        border-left: 1px solid var(--card-border);
    }

    .nav-links.nav-active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        opacity: 0;
        transform: translateX(50px);
        transition: all 0.5s ease;
    }

    .nav-links.nav-active a {
        opacity: 0.7;
        transform: translateX(0);
    }

    .nav-links.nav-active a:hover {
        opacity: 1;
    }

    .burger {
        display: block;
    }

    /* Hero Section */
    .hero-section {
        height: 100vh;
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 12vw;
        margin-bottom: 15px;
    }

    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
        margin-bottom: 30px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .cta-button {
        width: 100%;
        text-align: center;
        padding: 14px 30px;
        font-size: 0.8rem;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    /* About Section - MOBILE OPTIMIZED */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image {
        height: 350px;
        order: -1;
    }

    .about-text h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .about-text p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .personal-info {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 30px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .download-button {
        width: 100%;
        justify-content: center;
        margin-top: 30px;
    }

    /* Timeline */
    .timeline {
        padding-left: 20px;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
    }

    /* Projects Grid */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .project-img {
        height: 200px;
    }

    .project-info {
        padding: 20px;
    }

    .project-info h3 {
        font-size: 1.1rem;
    }

    .project-tech {
        flex-wrap: wrap;
        gap: 8px;
        margin: 15px 0;
    }

    /* Skills Grid */
    .skills-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 15px;
    }

    .skill-item {
        padding: 20px 15px;
    }

    .skill-icon {
        font-size: 2rem;
    }

    .skill-item h4 {
        font-size: 0.9rem;
    }

    /* Contact Section */
    .contact-container {
        flex-direction: column;
        gap: 30px;
    }

    .contact-info,
    .contact-form-container {
        width: 100%;
    }

    .contact-info {
        padding: 25px;
    }

    .contact-info h3 {
        font-size: 1.3rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
    }

    .submit-btn {
        width: 100%;
        padding: 14px 30px;
    }

    /* Footer - MOBILE OPTIMIZED */
    .footer {
        padding: 50px 0 30px;
    }

    .footer-content {
        flex-direction: column !important;
        text-align: center;
        gap: 20px;
    }

    .footer-logo h3 {
        font-size: 1.5rem;
    }

    .footer-logo p {
        font-size: 0.9rem;
    }

    .footer-bottom p {
        font-size: 0.85rem;
    }

    /* Hide custom cursor on mobile */
    .cursor,
    .cursor-follower {
        display: none;
    }

    /* Scroll to top button */
    .scroll-top-btn {
        width: 45px !important;
        height: 45px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .navbar {
        padding: 0 15px;
    }

    .logo-img {
        height: 26px;
    }

    /* Hero */
    .hero-content h1 {
        font-size: 14vw;
    }

    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 1.5rem;
    }

    /* About - EXTRA SMALL MOBILE */
    .about-image {
        height: 280px;
    }

    .about-text h3 {
        font-size: 1.3rem;
    }

    .about-text p {
        font-size: 0.95rem;
    }

    .info-title {
        font-size: 0.85rem;
    }

    .info-value {
        font-size: 0.95rem;
    }

    /* Timeline */
    .timeline-dot {
        left: -27px;
        width: 8px;
        height: 8px;
    }

    .timeline-content {
        padding: 15px;
    }

    /* Projects */
    .project-img {
        height: 180px;
    }

    .project-info {
        padding: 15px;
    }

    /* Skills */
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .skill-item {
        padding: 15px 10px;
    }

    .skill-icon {
        font-size: 1.8rem;
    }

    /* Contact */
    .contact-info,
    .contact-form-container {
        padding: 20px;
    }

    .info-item {
        font-size: 0.9rem;
    }

    /* Social links */
    .social-links {
        justify-content: center !important;
    }

    /* Footer - EXTRA SMALL MOBILE */
    .footer-logo h3 {
        font-size: 1.2rem;
    }

    .footer-logo p {
        font-size: 0.8rem;
    }

    .footer-bottom p {
        font-size: 0.75rem;
    }
}

/* Landscape orientation for phones */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: 100px 20px 60px;
    }

    .hero-content h1 {
        font-size: 10vw;
    }

    .nav-links {
        height: calc(100vh - var(--header-height));
    }
}

/* Very large screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    .hero-content h1 {
        font-size: 7rem;
    }

    .section-header h2 {
        font-size: 3.5rem;
    }
}