/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .image-container {
        width: 350px;
        height: 350px;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 60px;
    }
    
    .timeline-item .timeline-content {
        text-align: left !important;
        margin-left: 2rem !important;
        margin-right: 0 !important;
    }
    
    .timeline-date {
        position: absolute;
        left: 0;
        top: 0;
    }
}

/* Tablets */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
		position: absolute;
		top: -500px; /* escondido fora da tela */
		left: 0;
		width: 100%;
		background-color: #fff;
		box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
		padding: 20px 0;
		transition: top 0.3s ease;
		z-index: 10;
	  }

	.nav-menu.active {
		top: 100%; /* aparece logo abaixo do header */
	}
    
    .nav-list {
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
    }
    
    /* CORREÇÃO PRINCIPAL - Navigation Mobile */
    .nav-toggle {
        display: flex !important;
        position: relative;
        z-index: 1001;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        margin-left: auto;
    }
    
    .nav-toggle .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 4px 0;
        background-color: var(--primary-color);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    /* Animação do hambúrguer */
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
	
	header {
		position: relative;
		z-index: 15;
	}
	
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .image-container {
        width: 300px;
        height: 300px;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* About Section */
    .about-highlights {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item {
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Skills */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .image-container {
        width: 240px;
        height: 240px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .timeline-item {
        padding-left: 40px;
    }
    
    .timeline::before {
        left: 15px;
    }
    
    .timeline-item::before {
        left: 15px;
    }
    
    .nav-list {
        padding: 1rem;
    }
    
    .nav-link {
        font-size: 1.1rem;
    }
    
    /* Ajustar botão hambúrguer para telas muito pequenas */
    .nav-toggle {
        padding: 4px;
    }
    
    .nav-toggle .bar {
        width: 22px;
        height: 2px;
    }
}

/* Landscape Orientation for Mobile */
@media (max-height: 780px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
        min-height: auto;
    }
    
    .hero-content {
        gap: 1.5rem;
    }
    
    .image-container {
        width: 400px;
        height: 400px;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-image,
    .portfolio-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav-toggle,
    .hero-buttons,
    .contact-form,
    .social-links {
        display: none;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    .portfolio-overlay {
        display: none;
    }
    
    .timeline-item {
        page-break-inside: avoid;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        /* manter as cores claras mesmo no modo escuro */
        --text-dark: #2C3E50;
        --text-light: #7F8C8D;
        --background-light: #F8F9FA;
        --white: #FFFFFF;
    }
    
    body {
        background-color: #121212;
        color: var(--text-dark);
    }
    
    .header {
        background: rgba(255, 255, 255, 0.95);
    }
    
    .hero {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    }
	
	.portfolio{
		background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	}
	
	.skills{
		background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	}
    
    .nav-link {
        color: var(--text-dark);
    }
    
    .lang-btn {
        color: var(--text-dark);
        border-color: var(--text-light);
    }
    
    .nav-toggle .bar {
        background: var(--text-dark);
    }
}

