/* Enhanced Mobile Responsiveness */

/* Small screens (phones) */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section h2 {
        font-size: 1rem;
    }
    
    .terminal-container {
        width: 100%;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        height: auto;
        min-height: 180px;
    }
    
    .resume-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .resume-buttons .btn {
        width: 100%;
    }
    
    .contact-form .form-group {
        margin-bottom: 15px;
    }
}

/* Medium screens (tablets) */
@media (min-width: 577px) and (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Header and navigation improvements for mobile */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }
    
    .nav-links {
        background-color: var(--bg-secondary);
        box-shadow: 0 5px 15px var(--shadow);
        padding: 20px;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .nav-links li {
        margin: 10px 0;
    }
    
    /* Improve hamburger button */
    .hamburger .line {
        transition: all 0.3s ease;
    }
    
    .hamburger.active .line:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active .line:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .line:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* Optimize font sizes for different screens */
@media (max-width: 992px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
}

/* Mobile styles for new sections */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-primary);
        padding: 20px 0;
        transition: left var(--transition-speed);
        box-shadow: 0 5px 10px var(--shadow);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .education-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .experience-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .experience-timeline {
        padding-left: 15px;
    }
    
    .experience-item {
        padding: 20px 15px;
    }
    
    .experience-item::before {
        left: -23px;
        width: 10px;
        height: 10px;
    }
    
    .achievement-item {
        padding: 15px;
    }
    
    .skill-category {
        padding: 15px;
    }
    
    .skill-tag {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
    
    .cryptonite-showcase {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .cryptonite-logo {
        width: 60px;
        height: 60px;
    }
    
    .team-stats {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .hobbies-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hobby-card {
        padding: 25px 20px;
    }
    
    .hobby-icon {
        font-size: 2rem;
    }
    
    .education-item {
        margin-bottom: 25px;
    }
    
    .stat-item {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

@media (max-width: 576px) {
    .experience-timeline::before {
        left: 10px;
    }
    
    .experience-item::before {
        left: -18px;
        width: 8px;
        height: 8px;
    }
    
    .achievement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .achievement-header i {
        font-size: 1.2rem;
    }
    
    .experience-details .company {
        font-size: 0.95rem;
    }
    
    .experience-details .location {
        font-size: 0.85rem;
    }
    
    .skill-items {
        gap: 6px;
    }
    
    .skill-tag {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .hobby-card {
        padding: 20px 15px;
    }
    
    .hobby-icon {
        font-size: 1.8rem;
    }
    
    .cryptonite-logo {
        width: 50px;
        height: 50px;
    }
    
    .team-stats {
        flex-direction: column;
        gap: 8px;
    }
    
    .stat-item {
        font-size: 0.7rem;
    }
}
