/* Reset e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #333;
    --accent-color: #ffff00;
    --accent-hover: #e6e600;
    --text-color: #f0f0f0;
    --light-gray: #888;
    --card-bg: #2a2a2a;
    --section-spacing: 80px;
    --section-spacing-mobile: 60px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header e Navegação - CORREÇÃO DO MENU HAMBURGUER */
header {
    background-color: rgba(26, 26, 26, 0.98);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    z-index: 1001;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 30px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav a:hover {
    color: var(--accent-color);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* Seção Hero */
.hero {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a2a2a 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.greeting {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: block;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    white-space: nowrap;
}

.highlight {
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0.8);
    transition: transform 0.3s ease;
}

.hero h1:hover .highlight::after {
    transform: scaleX(1);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--light-gray);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    transform: scale(1);
}

.btn:hover {
    transform: scale(1.05);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 255, 0, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 0, 0.1);
    transform: translateY(-3px) scale(1.05);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.profile-image {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    background: transparent;
    transition: transform 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.05);
}

.hero-profile {
    width: 350px;
    height: 350px;
    border-radius: 50%;
}

.hero-profile img.logo-hero {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 50%;
}

.location {
    display: flex;
    align-items: center;
    gap: 8px;
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-bg);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.location:hover {
    transform: scale(1.05);
}

/* Seções comuns */
section {
    padding: var(--section-spacing) 0;
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.3;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background-color: var(--accent-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.section-title p {
    color: var(--light-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Sobre - CORREÇÃO COMPLETA DA IMAGEM E ALINHAMENTO */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
}

.about-text {
    flex: 1;
    min-width: 0;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--light-gray);
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.about-profile {
    width: 380px;
    height: 380px;
    border-radius: 50%;
   /* border: 4px solid var(--accent-color); */
    box-shadow: 0 15px 35px rgba(255, 255, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.about-profile:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 45px rgba(255, 255, 0, 0.3);
}

.about-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.about-profile:hover img {
    transform: scale(1.1);
}

/* Estatísticas Sobre - CORREÇÃO DE CENTRALIZAÇÃO */
.about-stats {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    max-width: 400px;
    width: 100%;
}

.stat {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    transform: scale(1);
    flex: 1;
}

.stat:hover {
    transform: scale(1.1);
    background-color: var(--card-bg);
}

.stat h4 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat p {
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* Formação Acadêmica */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.education-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s ease;
    transform: scale(1);
    position: relative;
    overflow: hidden;
}

.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 0, 0.05), transparent);
    transition: left 0.5s ease;
}

.education-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.education-card:hover::before {
    left: 100%;
}

.education-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.education-card:hover .education-icon {
    transform: scale(1.1) rotate(5deg);
}

.education-content {
    flex: 1;
}

.education-content h3 {
    color: var(--accent-color);
    margin-bottom: 8px;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.education-card:hover .education-content h3 {
    color: var(--accent-hover);
}

.education-content h4 {
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.education-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.education-date {
    background-color: rgba(255, 255, 0, 0.1);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.education-card:hover .education-date {
    background-color: rgba(255, 255, 0, 0.2);
    transform: translateY(-2px);
}

.education-grade {
    background-color: rgba(0, 255, 0, 0.1);
    color: #00ff00;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.education-card:hover .education-grade {
    background-color: rgba(0, 255, 0, 0.2);
    transform: translateY(-2px);
}

.education-content p {
    color: var(--light-gray);
    line-height: 1.5;
    transition: transform 0.3s ease;
}

.education-card:hover .education-content p {
    transform: translateY(-3px);
}

/* Habilidades */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.skill-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    transform: scale(1);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.skill-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.skill-card:hover::before {
    left: 100%;
}

.skill-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.2);
}

.skill-card h3 {
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.skill-card:hover h3 {
    color: var(--accent-color);
}

.skill-card p {
    color: var(--light-gray);
    transition: transform 0.3s ease;
}

.skill-card:hover p {
    transform: translateY(-5px);
}

/* Timeline Experiência */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.timeline-date {
    flex: 1;
    text-align: right;
    padding-right: 40px;
    font-weight: 600;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-date {
    transform: translateX(-10px);
    color: var(--accent-hover);
}

.timeline-content {
    flex: 1;
    padding-left: 40px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    position: relative;
    transition: all 0.3s ease;
    transform: scale(1);
}

.timeline-content:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.timeline-content:hover::before {
    transform: scale(1.3);
    background: var(--accent-hover);
}

.timeline-content h3 {
    color: var(--accent-color);
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.timeline-content:hover h3 {
    color: var(--accent-hover);
}

.timeline-content h4 {
    color: var(--light-gray);
    font-weight: normal;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.timeline-content ul {
    list-style: none;
    padding: 0;
}

.timeline-content li {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-content:hover li {
    transform: translateX(5px);
}

.timeline-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

.timeline-content:hover li::before {
    color: var(--accent-hover);
}

/* Projetos - MELHORIA NAS IMAGENS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: scale(1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 0, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.project-card:hover::before {
    opacity: 1;
}

.project-image {
    height: 200px;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

/* SOLUÇÃO PARA AS IMAGENS - Mantém proporção sem espaços indesejados */
.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Container inteligente para imagens que devem manter proporção */
.project-image.contain-image img {
    object-fit: contain;
    padding: 15px;
    background-color: var(--primary-color);
}

/* Para logos e imagens com fundo transparente */
.project-image.logo-image {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

.project-image.logo-image img {
    object-fit: contain;
    padding: 20px;
    max-width: 80%;
    max-height: 80%;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-image i {
    font-size: 4rem;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.project-card:hover .project-image i {
    transform: scale(1.2);
    color: var(--accent-hover);
}

.project-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
}

.project-fallback i {
    font-size: 4rem;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.project-card:hover .project-fallback i {
    transform: scale(1.2);
    color: var(--accent-hover);
}

.project-content {
    padding: 20px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card:hover .project-content {
    transform: translateY(-5px);
}

.project-content h3 {
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.project-card:hover .project-content h3 {
    color: var(--accent-color);
}

.project-content p {
    color: var(--light-gray);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    flex: 1;
}

.project-card:hover .project-content p {
    transform: translateY(-3px);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tech-tag {
    background-color: rgba(255, 255, 0, 0.1);
    color: var(--accent-color);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    transform: scale(1);
}

.project-card:hover .tech-tag {
    transform: scale(1.1);
    background-color: rgba(255, 255, 0, 0.2);
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.project-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    transform: scale(1);
}

.project-link:hover {
    color: var(--accent-color);
    transform: scale(1.1) translateY(-2px);
}

/* Contato - CORREÇÃO COMPLETA DO LAYOUT */
.contact-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    transform: scale(1);
    width: 100%;
    max-width: 400px;
    justify-content: flex-start;
}

.contact-item:hover {
    transform: scale(1.02);
    background-color: var(--card-bg);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.contact-text {
    text-align: left;
    flex: 1;
}

.contact-text h4 {
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.contact-item:hover .contact-text h4 {
    color: var(--accent-color);
}

.contact-text p {
    color: var(--light-gray);
}

.contact-form {
    flex: 1;
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    transition: all 0.3s ease;
    transform: scale(1);
    width: 100%;
}

.contact-form:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--secondary-color);
    border: 1px solid #444;
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    transform: scale(1.02);
    box-shadow: 0 0 0 2px rgba(255, 255, 0, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer - ESTRUTURA CORRIGIDA */
footer {
    background-color: var(--secondary-color);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.footer-text {
    flex: 1;
    text-align: left;
}

.footer-text p {
    font-size: 1.2rem;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-text:hover p {
    color: var(--accent-color);
}

.footer-text span {
    color: var(--light-gray);
    font-size: 0.9rem;
    display: block;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    transform: scale(1);
}

.social-link:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: var(--light-gray);
    font-size: 0.9rem;
    width: 100%;
}

/* Responsividade - CORREÇÕES ESPECÍFICAS */
@media (max-width: 992px) {
    :root {
        --section-spacing: 70px;
    }
    
    .hero-content, .about-content, .contact-content {
        flex-direction: column;
    }
    
    .hero-text, .about-text, .contact-info {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2.8rem;
        white-space: normal;
    }
    
    .hero-profile {
        width: 300px;
        height: 300px;
    }
    
    .about-profile {
        width: 320px;
        height: 320px;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* CORREÇÃO CRÍTICA - Contact section abaixo de 992px */
    .contact-content {
        flex-direction: column;
        gap: 40px;
        width: 100%;
    }
    
    .contact-info,
    .contact-form {
        flex: none;
        width: 100%;
        max-width: 100%;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
    }
    
    .contact-item {
        max-width: 100%;
        justify-content: center;
    }
    
    /* CORREÇÃO DO FOOTER - 769px a 992px */
    .footer-content {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }
    
    .footer-text {
        text-align: left;
        flex: 1;
    }
    
    .social-links {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --section-spacing: var(--section-spacing-mobile);
    }
    
    /* CORREÇÃO DO MENU HAMBURGUER - Posicionamento correto */
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav li {
        margin: 10px 0;
        text-align: center;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .hero {
        padding: 150px 0 80px;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        white-space: normal;
        text-align: center;
    }
    
    .hero-profile {
        width: 250px;
        height: 250px;
    }
    
    .about-profile {
        width: 280px;
        height: 280px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column;
    }
    
    .timeline-date {
        text-align: left;
        padding-right: 0;
        padding-left: 40px;
        margin-bottom: 10px;
    }
    
    .timeline-content {
        padding-left: 40px;
        margin-left: 20px;
    }
    
    .timeline-content::before {
        left: -30px;
    }
    
    /* CORREÇÃO DAS STATS - 460px a 768px */
    .about-stats {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        max-width: 100%;
        margin: 30px auto;
    }
    
    .stat {
        flex: 1;
        min-width: 120px;
        padding: 15px 10px;
    }
    
    .stat h4 {
        font-size: 1.8rem;
    }
    
    .stat p {
        font-size: 0.8rem;
    }
    
    /* CORREÇÃO DA SEÇÃO DE CONTACTO PARA MOBILE */
    .contact-content {
        gap: 30px;
        width: 100%;
    }
    
    .contact-info,
    .contact-form {
        width: 100%;
        max-width: 100%;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        max-width: 100%;
    }
    
    .contact-text {
        text-align: center;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    /* MELHORIA - Projetos em mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-image.contain-image img {
        padding: 10px;
    }
    
    .project-image.logo-image img {
        padding: 15px;
    }
    
    /* CORREÇÃO DO FOOTER - Mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 25px;
        align-items: center;
    }
    
    .footer-text {
        order: 1;
        text-align: center;
    }
    
    .social-links {
        order: 2;
        margin-left: 0;
        margin-bottom: 0;
    }
    
    .copyright {
        order: 3;
        margin-top: 20px;
    }
    
    .skill-card:hover,
    .project-card:hover,
    .timeline-content:hover,
    .education-card:hover,
    .certification-card:hover {
        transform: scale(1.02);
    }
}

@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 25px;
        text-align: center;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-profile {
        width: 220px;
        height: 220px;
    }
    
    .about-profile {
        width: 250px;
        height: 250px;
    }
    
    .education-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .education-icon {
        align-self: center;
    }
    
    .education-meta {
        justify-content: center;
    }
    
    .skill-card:hover,
    .project-card:hover {
        transform: scale(1.01);
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    /* CORREÇÃO FINAL - Contact section em telas muito pequenas */
    .contact-content {
        gap: 25px;
    }
    
    .contact-form {
        padding: 15px;
    }
    
    .contact-item {
        padding: 15px;
    }
    
    /* CORREÇÃO DAS STATS - Abaixo de 460px */
    .about-stats {
        flex-direction: column;
        gap: 20px;
        max-width: 280px;
        margin: 30px auto;
    }
    
    .stat {
        width: 100%;
        padding: 20px;
    }
    
    /* MELHORIA - Projetos em telas muito pequenas */
    .project-image {
        height: 160px;
    }
    
    .project-image.contain-image img {
        padding: 8px;
    }
    
    .project-image.logo-image img {
        padding: 12px;
    }
    
    /* Ajustes específicos para iPhone e Safari */
    @supports (-webkit-touch-callout: none) {
        .hero {
            min-height: -webkit-fill-available;
        }
        
        body {
            -webkit-overflow-scrolling: touch;
        }
    }
}

/* CORREÇÃO ESPECÍFICA PARA 460px ATÉ 768px */
@media (min-width: 461px) and (max-width: 768px) {
    .about-stats {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        max-width: 100%;
        margin: 30px auto;
    }
    
    .stat {
        flex: 1;
        min-width: 120px;
        padding: 15px 10px;
    }
    
    .stat h4 {
        font-size: 1.8rem;
    }
    
    .stat p {
        font-size: 0.8rem;
    }
}

/* CORREÇÃO ESPECÍFICA PARA 769px ATÉ 992px */
@media (min-width: 769px) and (max-width: 992px) {
    .about-stats {
        justify-content: center;
        margin: 30px auto;
        max-width: 500px;
    }
    
    .stat {
        flex: 1;
        padding: 20px 15px;
    }
    
    /* Footer específico para 769px-992px */
    .footer-content {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }
    
    .footer-text {
        text-align: left;
        flex: 1;
    }
    
    .social-links {
        margin-left: 0;
        justify-content: flex-end;
        flex-shrink: 0;
    }
}

/* CORREÇÃO DO FOOTER PARA DESKTOP (993px+) */
@media (min-width: 993px) {
    .footer-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        margin-bottom: 25px;
    }
    
    .footer-text {
        flex: 1;
        text-align: left;
        min-width: 0;
    }
    
    .social-links {
        display: flex;
        gap: 15px;
        flex-shrink: 0;
        margin-left: 40px;
        justify-content: flex-end;
    }
    
    .copyright {
        text-align: center;
        padding-top: 20px;
        border-top: 1px solid #444;
        color: var(--light-gray);
        font-size: 0.9rem;
        width: 100%;
        margin-top: 20px;
    }
}

/* CORREÇÃO ESPECÍFICA DA ABOUT-IMAGE PARA ECRÃS MENORES */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }
    
    .about-text {
        text-align: center;
        width: 100%;
    }
    
    .about-image {
        width: 100%;
        justify-content: center;
    }
    
    .about-profile {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 576px) {
    .about-profile {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 400px) {
    .about-profile {
        width: 220px;
        height: 220px;
    }
}

/* Correções específicas para Safari - SINTAXE CORRIGIDA */
@media not all and (min-resolution: 0.001dpcm) { 
    .hero {
        background-attachment: scroll;
    }
}

/* Suporte para orientação landscape em mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 120px 0 60px;
    }
    
    .hero-content {
        flex-direction: row;
    }
    
    .hero-profile {
        width: 200px;
        height: 200px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Contact section em landscape */
    .contact-content {
        flex-direction: row;
        gap: 20px;
    }
    
    .contact-info,
    .contact-form {
        flex: 1;
    }
    
    /* About section em landscape */
    .about-content {
        flex-direction: row;
        gap: 30px;
    }
    
    .about-profile {
        width: 200px;
        height: 200px;
    }
}

/* Ajuste das imagens dos projetos para viewports 400px-768px */
@media (min-width: 400px) and (max-width: 768px) {
    .project-image.contain-image img {
        object-fit: cover;
        padding: 0;
        background-color: transparent;
    }
    
    .project-image.logo-image img {
        object-fit: cover;
        padding: 0;
        max-width: 100%;
        max-height: 100%;
    }
    
    .project-image.contain-image,
    .project-image.logo-image {
        background-color: var(--secondary-color);
    }
}

/* Ajuste da location para manter posição em ecrãs menores */
@media (max-width: 992px) {
    .location {
        right: 20px;
        bottom: 20px;
        transform: none;
    }
}

@media (max-width: 768px) {
    .location {
        right: 10px;
        bottom: 10px;
    }
}

@media (max-width: 576px) {
    .location {
        right: 5px;
        bottom: 5px;
    }
}

/* Garantir que a location não se mova com transform no hover em mobile */
@media (max-width: 768px) {
    .location:hover {
        transform: scale(1.02);
    }
}
