:root {
    /* TOKENS - PORTFÓLIO OFICIAL */
    --color-bg:        #0e0c09;
    --color-surface:   #1a1610;
    --color-surface2:  #231e14;
    --color-accent:    #EF9F27;
    --color-accent2:   #BA7517;
    --color-accent3:   #FAC775;
    --color-text:      #F5F0E8;
    --color-muted:     #9C9080;
    --color-border:    rgba(239, 159, 39, 0.15);
    
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* MAPEAMENTO DE LEGADO TEMPORÁRIO */
    --bg-main: var(--color-bg);
    --bg-card: var(--color-surface);
    --text-main: var(--color-text);
    --text-muted: var(--color-muted);
    --accent: var(--color-accent);
    --border-light: var(--color-border);
    --border-hover: var(--color-accent2);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 10px;
}

/* Seleção de Texto */
::selection {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

html { scroll-behavior: auto; } /* Lenis assumes control */

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* Texture Grain SVG */
.grain-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 9999; opacity: 0.8; mix-blend-mode: overlay;
}

/* Premium Loader */
#premium-loader {
    position: fixed; inset: 0;
    background-color: var(--color-bg);
    z-index: 99999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}
.loader-brand {
    color: var(--color-accent);
    font-family: var(--font-display);
    font-size: 1.5rem; letter-spacing: 0.2em; font-weight: 700;
    animation: pulseBrand 1.5s infinite ease-in-out;
}
.loader-progress-bar {
    width: 200px; height: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden; position: relative; margin-top: 15px;
}
.progress-fill {
    position: absolute; top: 0; left: 0; height: 100%; width: 100%;
    background: var(--color-accent); transform-origin: left;
    animation: loadingBar 2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.loader-hidden { opacity: 0; pointer-events: none; }

@keyframes pulseBrand {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
@keyframes loadingBar {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(0.6); }
    100% { transform: scaleX(1); }
}

/* Typography & Utilities */
.container { max-width: 1300px; margin: 0 auto; padding: 0 3rem; }
.section { padding: 8rem 0; min-height: 100vh; display: flex; align-items: center; position: relative; }

.section-title {
    font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 4rem; text-transform: uppercase; letter-spacing: -2px;
    line-height: 1; font-weight: 600;
}

.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 32px; background: white; color: black;
    border-radius: 100px; text-decoration: none; font-weight: 600;
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s; border: none; cursor: pointer;
    font-family: var(--font-body); font-size: 1rem;
}
.btn-primary:hover { transform: scale(1.05); background: #f0f0f0; box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15); }

.btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 32px; background: transparent; color: var(--color-text);
    border-radius: 100px; text-decoration: none; font-weight: 600;
    transition: transform 0.3s, background 0.3s, border-color 0.3s, color 0.3s; 
    border: 1px solid var(--color-border); cursor: pointer;
    font-family: var(--font-body); font-size: 1rem;
}
.btn-outline:hover { 
    transform: scale(1.05); background: rgba(255,255,255,0.05); border-color: white; color: white;
}

.btn-icon {
    width: 50px; height: 50px; border: 1px solid var(--border-light);
    border-radius: 50%; display: inline-flex; justify-content: center; align-items: center;
    color: white; text-decoration: none; font-size: 1.4rem; transition: all 0.3s;
}
.btn-icon:hover { border-color: white; background: rgba(255,255,255,0.1); }

.disabled { opacity: 0.5; pointer-events: none; cursor: default; }

/* Navbar */
.navbar {
    position: fixed; top: 0; width: 100%; height: 90px;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 3rem; z-index: 1000;
    background: rgba(5, 5, 5, 0.7); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}
.logo { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: white;}
.logo-dot { color: var(--color-accent); }

.nav-links { display: flex; gap: 3rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text-main); text-decoration: none; font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.btn-primary { color: black !important; } /* Fix para o botão de contato */

.menu-toggle { display: none; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1001; }
.menu-toggle .bar { width: 30px; height: 2px; background: white; transition: 0.3s; }

.hero-container {
    display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: center;
    padding-top: 80px;
}
.hero-label-wrapper { overflow: hidden; margin-bottom: 2rem; }
.hero-label {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 2px; color: var(--color-accent);
    padding: 6px 16px; border: 1px solid var(--color-border);
    border-radius: 50px; background: rgba(239, 159, 39, 0.08);
}

.hero-title-wrapper { overflow: hidden; }
.hero-title { font-size: clamp(3rem, 6vw, 5rem); line-height: 0.95; letter-spacing: -3px; font-weight: 800; color: var(--color-text);}
.italic-accent { 
    font-style: italic; font-weight: 700; color: var(--color-accent); 
    padding-right: 5px; 
    font-size: calc(clamp(3rem, 6vw, 5rem) * 0.85); 
}
.hero-subtitle { margin: 2.5rem 0; font-size: 1.1rem; color: #d1c8ba; font-weight: 400; max-width: 480px; line-height: 1.6; }
.hero-actions { display: flex; gap: 1rem; align-items: center; }

.social-divider {
    width: 1px; height: 30px; background: var(--color-border); margin: 0 0.5rem;
}

.hero-image-wrapper {
    position: relative; display: flex; justify-content: center; align-items: center;
    flex-direction: column;
}
.image-frame {
    width: 100%; max-width: 350px; aspect-ratio: 1/1;
    overflow: hidden; position: relative;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    border: 2px solid rgba(239, 159, 39, 0.3);
    box-shadow: 0 0 25px rgba(239, 159, 39, 0.1);
    background: var(--color-surface);
}
.hero-img {
    width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1/1;
    transform: scale(1.05); transition: transform 0.5s;
    /* Nitidez e Aceleração de GPU Fix */
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: subpixel-antialiased;
    will-change: transform;
}
/* Removido pseudo element :hover p/ não competir com Morphing Blob */

@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Floating Badge Wrapper to center horizontally */
.hero-badge-wrapper {
    position: absolute; bottom: -15px; width: 100%; display: flex; justify-content: center;
    z-index: 2; pointer-events: none;
}
/* Floating Badge */
.hero-badge {
    background: var(--color-surface);
    padding: 8px 24px; border-radius: 50px;
    border: 1px solid var(--color-border);
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-display); font-weight: 500; font-size: 0.95rem;
    color: var(--color-accent3);
    pointer-events: auto;
}
.hero-badge i { color: var(--color-accent); font-size: 1.2rem; }

.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; }
.about-text-card {
    background: var(--color-surface); padding: 3.5rem; border-radius: 30px;
    border: 1px solid var(--color-border);
    display: flex; flex-direction: column; justify-content: space-between;
}
.skills-card {
    background: var(--color-surface); padding: 3.5rem; border-radius: 30px;
    border: 1px solid var(--color-border);
    display: flex; flex-direction: column; justify-content: space-between;
    height: auto !important; min-height: max-content; overflow: visible !important;
}
.about-text-content p { font-size: 1.25rem; color: #F5F0E8 !important; opacity: 1 !important; margin-bottom: 1.5rem; line-height: 1.7; font-weight: 400; }
.about-text-content p:last-child { margin-bottom: 0; }
.about-text-content strong { color: var(--color-accent); font-weight: 600; }

.tech-category h4 { margin-bottom: 1.5rem; font-size: 1.1rem; color: var(--color-text); text-transform: uppercase; letter-spacing: 2px; }
.tech-grid { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem; overflow: visible !important; }
.stat-number { font-size: 3.5rem; font-family: var(--font-display); font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 5px;}
.stat-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 500;}

.skills-card h3 { font-size: 2rem; margin-bottom: 2.5rem; font-family: var(--font-display); }
.tech-category h4 { font-size: 0.85rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1.2rem; letter-spacing: 1px; }
.tech-master { 
    padding: 6px 14px; border: 1px solid var(--color-accent); 
    border-radius: 12px; font-size: 1rem; background: rgba(239, 159, 39, 0.08);
    transition: all 0.3s; display: flex; align-items: center; gap: 10px;
    font-weight: 500; color: var(--color-accent3);
}
.tech-master i { font-size: 1.4rem; color: var(--color-accent); }
.tech-master:hover { 
    border-color: var(--color-accent2); 
    background: rgba(239, 159, 39, 0.12); 
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(239, 159, 39, 0.15);
}

.tech-tool { 
    padding: 4px 10px; border: 1px solid var(--color-border); 
    border-radius: 12px; font-size: 0.9rem; background: transparent;
    transition: all 0.3s; display: flex; align-items: center; gap: 8px;
    font-weight: 500; color: var(--color-muted);
}
.tech-tool i { font-size: 1.2rem; color: var(--color-muted); }
.tech-tool:hover { 
    border-color: var(--color-accent); 
    color: var(--color-text);
    transform: translateY(-2px);
}
.tech-tool:hover i { color: var(--color-accent); }

/* =========================================
   PROJECTS
   ========================================= */
.projects-section {
    padding-bottom: 15rem; /* Space for sticky cards */
}
.projects-wrapper {
    position: relative;
    display: flex; flex-direction: column; gap: 2rem; /* Add gap as fallback */
}

.project-card {
    position: sticky;
    top: 15vh; /* Sticky position offset */
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 0;
    background: var(--bg-card);
    border-radius: 30px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.5);
    transition: transform 0.4s, filter 0.4s;
    transform-origin: top center;
    height: 70vh;
    min-height: 500px;
}

.project-content {
    padding: clamp(2rem, 4vw, 4rem);
    display: flex; flex-direction: column; justify-content: center;
}

.project-number { 
    font-family: var(--font-display); font-size: 1.2rem; 
    color: var(--accent); font-weight: 600; margin-bottom: 1.5rem; 
}

.project-content h3 { font-size: 3.5rem; margin-bottom: 0.5rem; line-height: 1; }
.project-summary { font-size: 1.15rem; color: var(--color-text); opacity: 0.85; font-weight: 400; margin-bottom: 1.5rem; line-height: 1.6; }

.project-tags { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.project-tags span { 
    font-size: 0.85rem; text-transform: uppercase; font-weight: 500;
    background: rgba(255,255,255,0.05); padding: 8px 20px; border-radius: 50px; 
    border: 1px solid var(--border-light);
}

.project-actions {
    display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap;
}
.project-actions .btn-primary, .project-actions .btn-outline {
    font-size: 0.95rem; padding: 12px 24px;
}

.btn-project {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 1.1rem; font-weight: 600; color: white; text-decoration: none;
    width: fit-content; padding-bottom: 5px; border-bottom: 1px solid transparent;
    transition: border-color 0.3s, gap 0.3s;
}
.btn-project:hover { border-color: white; gap: 15px; }

.project-visual {
    width: 100%; height: 100%; position: relative; overflow: hidden;
    background: rgba(255,255,255,0.02);
    display: flex; align-items: center; justify-content: center;
    padding: 3rem; /* Frame element */
}
.project-visual::after {
    /* Removido o overlay escuro pois agora usaremos o formato frame e destaque principal da imagem */
    content: none;
}
.project-visual img {
    width: 100%; aspect-ratio: 16 / 7; object-fit: cover; object-position: center;
    border-radius: 24px; 
    border: 1px solid rgba(255, 255, 255, 0.08); /* Borda limite Fokus fix */
    box-shadow: 0 4px 30px rgba(0,0,0,0.6); /* Elevação sombra Fix fokus */
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.8s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.8s;
    filter: grayscale(40%) contrast(1.1);
}

#project-opencell .project-visual img {
    object-position: top center;
}

.project-card:hover .project-visual img { 
    filter: grayscale(0%) contrast(1); 
    box-shadow: 0 40px 80px rgba(0,0,0,0.8);
    border-color: rgba(239, 159, 39, 0.4); 
}
.cursor-clickable { cursor: pointer; position: relative; }

.project-modal-overlay {
    position: fixed; inset: 0; background: rgba(8, 6, 5, 0.6); backdrop-filter: blur(20px);
    z-index: 999999; display: flex; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.project-modal-overlay.active { opacity: 1; pointer-events: all; }

.project-modal-content {
    background: rgba(26, 22, 16, 0.9); width: 92%; max-width: 650px;
    max-height: 90vh; overflow-y: auto; overflow-x: hidden;
    border-radius: 24px; border: 1px solid var(--color-border);
    padding: 3.5rem; position: relative;
    transform: translateY(40px) scale(0.95); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
}
.project-modal-content::-webkit-scrollbar { width: 5px; }
.project-modal-content::-webkit-scrollbar-thumb { background: rgba(239, 159, 39, 0.5); border-radius: 10px; }
.project-modal-overlay.active .project-modal-content { transform: translateY(0) scale(1); }

.close-modal {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: rgba(255,255,255,0.05); border: none; border-radius: 50%; width: 45px; height: 45px;
    display: flex; justify-content: center; align-items: center; font-size: 1.4rem;
    color: var(--color-text); transition: all 0.3s; cursor: pointer;
}
.close-modal:hover { background: var(--color-accent); color: #0e0c09; transform: rotate(90deg); }

.modal-label { font-size: 0.8rem; color: var(--color-accent); letter-spacing: 2px; text-transform: uppercase; font-weight: 600; display: block; margin-bottom: 10px; }
.modal-body h3 { font-family: var(--font-display); font-size: 3.5rem; margin-bottom: 1.5rem; line-height: 1; color: white; }
.modal-body p { font-size: 1.15rem; color: #d1c8ba; line-height: 1.8; margin-bottom: 3rem; }

.modal-actions { display: flex; gap: 1rem; }
.modal-btn { 
    flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 10px;
    border-radius: 12px; padding: 1.2rem; font-size: 1rem; font-weight: 700;
    transition: all 0.3s; border: none; text-decoration: none; cursor: pointer;
}
.modal-btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.modal-btn-outline:hover { border-color: white; background: rgba(255,255,255,0.05); color: white; transform: translateY(-3px); }
.btn-primary.modal-btn { background: var(--color-accent); color: #0e0c09; }
.btn-primary.modal-btn:hover { background: var(--color-accent2); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(239, 159, 39, 0.2); }

/* =========================================
   CONTACT
   ========================================= */
.contact-section { padding-top: 8rem; min-height: 100vh; display: flex; align-items: center; }
.contact-title { font-size: clamp(3.5rem, 8vw, 6.5rem); margin-bottom: 4rem; line-height: 1.2; font-weight: 600; text-align: left; color: var(--color-text); padding-bottom: 10px; }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 6rem; align-items: start; width: 100%;}

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: 3rem; }

.input-group { position: relative; width: 100%; }

.input-group input, .input-group textarea {
    width: 100%; 
    background: rgba(255, 255, 255, 0.04); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    padding: 1.2rem;
    font-size: 1.1rem; 
    color: var(--color-text); 
    font-family: var(--font-body); 
    resize: none;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.input-group input::placeholder, .input-group textarea::placeholder {
    color: var(--color-muted);
}

.input-group input:focus, .input-group textarea:focus { 
    outline: none; 
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(239, 159, 39, 0.15);
}

.btn-submit {
    align-self: flex-start; padding: 1.2rem 3.5rem; font-size: 1.1rem; gap: 12px;
    background: var(--color-accent); color: #0e0c09; border-radius: 100px; border: none; cursor: pointer; font-weight: 700;
    margin-top: 1rem; transition: transform 0.3s, background 0.3s, box-shadow 0.3s; display: flex; align-items: center;
}
.btn-submit i { font-size: 1.4rem; color: #0e0c09; }

.btn-submit:hover { 
    background: var(--color-accent2); 
    transform: translateY(-4px); 
    box-shadow: 0 10px 20px rgba(239, 159, 39, 0.2);
}

/* Contact Info */
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.info-desc { font-size: 1.2rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 2rem; max-width: 400px;}
.contact-link {
    font-family: var(--font-display); font-size: 1.5rem; font-weight: 500;
    color: var(--text-main); text-decoration: none; transition: color 0.3s; width: fit-content;
}
.contact-link:hover { color: var(--accent); }

.social-links-footer { display: flex; gap: 1rem; margin-top: 2rem; }

/* Footer */
.copyright { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid var(--border-light); }

@media (max-width: 1024px) {
    .hero-container, .about-grid { grid-template-columns: 1fr; }
    .hero-image-wrapper { order: -1; margin-bottom: 2rem; }
    .hero-title { font-size: 5rem; text-align: center; }
    .hero-subtitle { text-align: center; margin: 2rem auto; }
    .hero-actions { justify-content: center; }
    
    .project-card { grid-template-columns: 1fr; height: auto; min-height: auto; position: relative; top: 0 !important; margin-bottom: 4rem; overflow: visible; }
    .project-visual { height: 350px; order: -1; }
    .project-content { padding: 2.5rem; }
    .projects-section { padding-bottom: 5rem; }
    
    .contact-grid { grid-template-columns: 1fr; gap: 4rem; }
    .contact-title { text-align: center; }
}

@media (max-width: 768px) {
    .navbar { padding: 0 2rem; }
    
    .menu-toggle { display: flex; }
    
    .nav-links { 
        position: fixed; top: 0; left: 100%; width: 100%; height: 100vh;
        background: rgba(5, 5, 5, 0.98); backdrop-filter: blur(15px);
        flex-direction: column; justify-content: center; align-items: center;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 0; margin: 0; gap: 3rem;
    }
    .nav-links.active { left: 0; }
    .nav-links a { font-size: 1.5rem; }
    
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    
    .section { padding: 5rem 0; min-height: auto; }
    .hero-section { min-height: 100vh !important; height: auto; }
    
    .hero-container { grid-template-columns: 1fr; padding-top: 100px; text-align: center; gap: 2rem; }
    .hero-image-wrapper { order: -1; margin-bottom: 2rem; }
    .hero-title { font-size: 3.5rem; }
    .hero-subtitle { margin: 1.5rem auto; text-align: center; }
    .hero-actions { justify-content: center; }
    .hero-actions .btn-primary { width: 100%; }
    
    .about-text-card, .skills-card { padding: 2rem; }
    .stats-row { flex-direction: column; gap: 2rem; text-align: center; }
    .stat-number { font-size: 2.5rem; }
    
    .project-content { padding: 2rem; }
    .project-content h3 { font-size: 2.5rem; }
    .project-actions { flex-direction: column; }
    .project-actions .btn-primary, .project-actions .btn-outline { width: 100%; justify-content: center; }
    .project-visual { height: 250px; padding: 1.5rem; }

    /* Modal Responsiveness */
    .project-modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }
    .modal-body h3 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    .modal-body p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .modal-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    .modal-btn {
        padding: 1rem;
        width: 100%;
    }
    .close-modal {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .contact-title { font-size: 3rem; }
    .contact-link { font-size: 1.2rem; word-break: break-all; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.8rem; }
    .section-title { font-size: 2.5rem; margin-bottom: 2rem; }
    
    .about-text-card, .skills-card { padding: 1.5rem; }
    .tech-master { padding: 6px 14px; font-size: 0.9rem; }
    .tech-tool { padding: 4px 10px; font-size: 0.85rem; }
    
    .project-content h3 { font-size: 2rem; }
    .project-content { padding: 1.5rem; }
    .project-number { margin-bottom: 1rem; }
    .project-tags span { font-size: 0.75rem; padding: 6px 15px; }

    .project-modal-overlay {
        align-items: flex-start;
        padding: 4vh 0; /* Desgruda o modal do topo da tela e evita corte do botão X */
    }
    .project-modal-content {
        margin: 0 auto;
        max-height: 85vh; /* Respeitando os 4vh de respiro acima e abaixo */
        padding: 2.5rem 1.5rem 3rem 1.5rem; /* Mais enxuto */
    }
    .modal-body h3 {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }
    .modal-body p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 2.5rem;
    }
    .close-modal {
        top: 15px; right: 15px; /* Não perder espaço ou não ficar oculto em telas mini */
    }
    
    .contact-title { font-size: 2.5rem; }
    .social-links-footer { flex-wrap: wrap; justify-content: center; }
}

/* =========================================
   VIEW TRANSITIONS API
   ========================================= */
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
  animation-duration: 0.25s;
  animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}