/* =========================================
   STYLE.CSS 
   ========================================= */

/* --- 1. NORMAL VARIABLES --- */
:root {
    --bg-body: #f5f5f7; --bg-card: #ffffff;
    --text-main: #1d1d1f; /*--text-muted: #86868b;*/ --text-muted: #6f6f74;
    --accent:/* #0066cc;*/#0056b3; --nav-bg: rgba(255, 255, 255, 0.85);
    --border-radius: 20px; --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- 2. HIGH CONTRAST VARIABLES --- */
[data-theme="high-contrast"] {
    --bg-body: #000000; --bg-card: #111111;
    --text-main: #ffffff; --text-muted: #dddddd;
    --accent: #ffff00; --nav-bg: rgba(0, 0, 0, 0.95);
    --shadow: 0 0 0 2px #ffff00;
}

/* --- CORE LAYOUT --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; width: 100%; }

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5; color: var(--text-main); background: var(--bg-body); 
    transition: var(--transition); -webkit-font-smoothing: antialiased;
    display: flex; flex-direction: column; min-height: 100vh;
}
@supports (min-height: 100dvh) { body { min-height: 100dvh; } }

main { flex-grow: 1; width: 100%; }

h1, h2, h3 { color: var(--text-main); font-weight: 600; letter-spacing: -0.02em; }
p { font-size: 1.05rem; font-weight: 400; color: var(--text-main); }
section { padding: 80px 5%; max-width: 1200px; margin: 0 auto; position: relative; }

#home { position: relative; z-index: 100; }
#overview { position: relative; z-index: 50; }
#featured-videos { position: relative; z-index: 10; }

/* --- NAVIGATION --- */
nav { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 1rem 5%; background: var(--nav-bg); 
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgba(0,0,0,0.05);
}
[data-theme="high-contrast"] nav { border-bottom: 1px solid var(--accent); }

.logo { font-size: 1.3rem; font-weight: 700; color: var(--text-main); text-decoration: none; letter-spacing: -0.02em;}
.nav-controls { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-main); font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); font-weight: 500;}

.icon-btn {
    background: none; border: none; cursor: pointer; color: var(--text-main);
    display: flex; align-items: center; justify-content: center;
    padding: 8px; border-radius: 50%; transition: background 0.2s;
}
.icon-btn:hover { background: rgba(0,0,0,0.05); color: var(--accent); }
[data-theme="high-contrast"] .icon-btn:hover { background: rgba(255,255,255,0.1); }
.menu-toggle { display: none; }

/* --- HERO & BIO --- */
#home { display: flex; flex-wrap: wrap; gap: 60px; align-items: center; padding-top: 60px; }
.hero-text { flex: 1; min-width: 300px; }
.hero-text h1 { font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1.1; margin-bottom: 10px; }
.hero-text h2 { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 30px; font-weight: 400; }

.bio-card { background: var(--bg-card); padding: 40px; border-radius: var(--border-radius); box-shadow: var(--shadow); margin-top: 20px; }
.bio-card p { margin-bottom: 15px; }
.bio-card ul { margin-left: 20px; margin-top: 15px; color: var(--text-main); }
.bio-card li { margin-bottom: 8px; font-size: 1.05rem; }

.hero-image { flex: 0 0 300px; display: flex; justify-content: center; }
.hero-image img { width: 300px; height: 300px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); border: 4px solid var(--bg-card); }

.award-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.award-icons { display: inline-flex; gap: 8px; align-items: center; }
.award-icons a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-body); color: var(--accent); transition: var(--transition); text-decoration: none; }
.award-icons a:hover { transform: scale(1.1); background: var(--accent); color: var(--bg-card); }

/* --- DASHBOARD STATS --- */
#overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; padding-top: 40px; padding-bottom: 40px;}
.stat-card { background: var(--bg-card); border-radius: var(--border-radius); padding: 30px; box-shadow: var(--shadow); text-decoration: none; display: flex; flex-direction: column; transition: var(--transition); border: 1px solid transparent; }
.stat-card:hover { transform: translateY(-5px); border-color: rgba(0, 102, 204, 0.3); }
[data-theme="high-contrast"] .stat-card:hover { border-color: var(--accent); }
.stat-card h3 { font-size: 3rem; color: var(--accent); margin-bottom: 5px; line-height: 1; }
.stat-card p { font-size: 1.2rem; font-weight: 600; margin-bottom: 15px; }
.stat-card .link-text { color: var(--text-muted); font-size: 0.95rem; display: flex; align-items: center; gap: 5px; font-weight: 500; }
.stat-card:hover .link-text { color: var(--accent); }

/* --- VIDEO CAROUSEL --- */
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 10px; }
.carousel-wrapper { position: relative; display: flex; align-items: center; margin-bottom: 60px; }

.carousel-btn {position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(5px); color: #1d1d1f; border: 1px solid rgba(0,0,0,0.1); border-radius: 50%; width: 48px; height: 48px; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 15px rgba(0,0,0,0.15); transition: var(--transition);}

.carousel-btn:hover { background: #fff; transform: translateY(-50%) scale(1.05); }
.carousel-btn.prev { left: -15px; } 
.carousel-btn.next { right: -15px; }
[data-theme="high-contrast"] .carousel-btn { background: #000; color: var(--accent); border: 2px solid var(--accent); }

.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 24px; padding: 20px 5px; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; width: 100%; }
.carousel-track::-webkit-scrollbar { display: none; }
.video-card { background: var(--bg-card); border-radius: var(--border-radius); padding: 20px; box-shadow: var(--shadow); scroll-snap-align: center; flex: 0 0 100%; display: flex; flex-direction: column; }
@media (min-width: 768px) { .video-card { flex: 0 0 calc(50% - 12px); } }
@media (min-width: 1024px) { .video-card { flex: 0 0 calc(33.333% - 16px); } }
.video-card h3 { margin-top: 20px; font-size: 1.1rem; line-height: 1.4; font-weight: 600; }

.iframe-container { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; border-radius: 12px; overflow: hidden; background: #000; }
.iframe-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- PUBLICATIONS & LISTS --- */
.pub-category { margin-top: 50px; margin-bottom: 20px; font-size: 1.8rem; color: var(--accent); border-bottom: 2px solid rgba(0,0,0,0.05); padding-bottom: 10px; }
[data-theme="high-contrast"] .pub-category { border-bottom: 2px solid var(--accent); }

.pub-list { list-style: none; padding: 0; }
.pub-item { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 25px; padding: 15px; border-radius: 12px; transition: var(--transition); background: transparent; }
.pub-item:hover { background: var(--bg-card); box-shadow: var(--shadow); transform: translateX(5px); }
[data-theme="high-contrast"] .pub-item:hover { border: 1px solid var(--accent); }

.pub-icon { flex: 0 0 40px; display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; background: rgba(0, 102, 204, 0.1); border-radius: 50%; color: var(--accent); transition: var(--transition); }
.pub-item:hover .pub-icon { background: var(--accent); color: #fff; }
.pub-text { flex: 1; font-size: 1.05rem; line-height: 1.6; }

/* --- HORIZONTAL MEDIA CARDS --- */
.media-list { display: flex; flex-direction: column; gap: 40px; margin-top: 40px; }
.media-card { display: flex; background: var(--bg-card); border-radius: var(--border-radius); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); border: 1px solid transparent; }
.media-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-color: rgba(0, 102, 204, 0.2); }
[data-theme="high-contrast"] .media-card:hover { border-color: var(--accent); }

.media-video { flex: 0 0 45%; position: relative; } 
.media-info { flex: 1; padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.media-info h3 { font-size: 1.4rem; margin-bottom: 10px; line-height: 1.3; }
.media-info .media-date { font-size: 0.9rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; display: block; }
.media-info p { margin-bottom: 20px; color: var(--text-muted); }

.btn-outline { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 8px 16px; border: 2px solid var(--accent); border-radius: 20px; color: var(--accent); text-decoration: none; font-weight: 600; transition: var(--transition); }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* --- FOOTER --- */
/*footer { background: var(--bg-card); padding: 40px 5%; text-align: center; border-top: 1px solid rgba(0,0,0,0.05); width: 100%; display: block; position: relative; z-index: 10; }
footer p  { color: var(--accent); text-decoration: none; font-weight: 500; }
[data-theme="high-contrast"] footer { border-top: 1px solid var(--accent); }

.footer-contact { margin-bottom: 25px; }
.footer-contact p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 5px; }
.footer-contact a { color: var(--accent); text-decoration: none; font-weight: 500; }
.footer-contact a:hover { text-decoration: underline; }
[data-theme="high-contrast"] .footer-contact p { color: var(--text-main); }

.social-icons { display: flex; justify-content: center; gap: 20px; margin-bottom: 15px; }
.social-icons svg { width: 24px; height: 24px; fill: var(--text-muted); transition: fill 0.2s; }
.social-icons a:hover svg { fill: var(--accent); }
footer > p.fade-in { color: var(--text-muted); font-size: 0.9rem; }

.copyright { margin-bottom: 25px; }
.copyright p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 5px; }
.copyright a { color: var(--accent); text-decoration: none; font-weight: 500; }
.copyright a:hover { text-decoration: underline; }
[data-theme="high-contrast"] .copyright p { color: var(--text-main); }
*/
/* --- FOOTER --- */
footer { background: var(--bg-card); padding: 40px 5%; text-align: center; border-top: 1px solid rgba(0,0,0,0.05); width: 100%; display: block; position: relative; z-index: 10; }
[data-theme="high-contrast"] footer { border-top: 1px solid var(--accent); }

.footer-contact { margin-bottom: 25px; }
.footer-contact p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 5px; }
.footer-contact a { color: var(--accent); text-decoration: none; font-weight: 500; }
.footer-contact a:hover { text-decoration: underline; }
[data-theme="high-contrast"] .footer-contact p { color: var(--text-main); }

.social-icons { display: flex; justify-content: center; gap: 20px; margin-bottom: 15px; }
.social-icons svg { width: 24px; height: 24px; fill: var(--text-muted); transition: fill 0.2s; }
.social-icons a:hover svg { fill: var(--accent); }

/* CORREÇÃO DO COPYRIGHT: Forçar a cor visível e remover dependência da opacidade zero */
.copyright { margin-bottom: 25px; opacity: 1 !important; transform: none !important; }
.copyright p { font-size: 0.95rem; color: var(--text-main) !important; margin-bottom: 5px; opacity: 1 !important; }
.copyright a { color: var(--accent); text-decoration: underline; font-weight: 500; }
.copyright a:hover { text-decoration: none; }
[data-theme="high-contrast"] .copyright p { color: var(--text-main); }
/* --- SCROLL ANIMATIONS --- */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.appear { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .fade-in { transition: none; opacity: 1; transform: translateY(0); } }

/* --- MOBILE --- */
@media (max-width: 800px) {
    .menu-toggle { display: flex; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--nav-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); flex-direction: column; padding: 20px; text-align: center; gap: 20px; border-bottom: 1px solid rgba(0,0,0,0.1); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 1.2rem; }
    #home { flex-direction: column-reverse; text-align: center; }
    .bio-card { text-align: left; padding: 25px; }
    .award-line { justify-content: flex-start; }
    .hero-image img { width: 250px; height: 250px; }
    .carousel-btn.prev { left: 5px; }
    .carousel-btn.next { right: 5px; }
    .carousel-btn { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.95); }
/*
    .media-card {flex-direction: column; }
    .media-video { flex: 0 0 auto; width: 100%; }
    .media-info { padding: 20px; }
*/
    .media-card { flex-direction: column; }
    .media-video { flex: 0 0 auto; width: 100%; }
    .media-info { padding: 20px; }
    .media-thumbnail { margin: 20px auto 0 auto; display: block; }

    .pub-list {width: 100%; padding: 0; margin: 0; }
    .pub-item {width: 100%; padding: 12px; gap: 12px; box-sizing: border-box; }
    .pub-text {font-size: 0.95rem; display: inline; word-break: normal !important; word-wrap: normal !important; overflow-wrap: anywhere !important; }
    .pub-text a {display: inline-block; max-width: 100%; word-break: break-all !important; }

}

/* --- MODAL STYLES --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0; 
    bottom: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

.modal-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 90%; 
    max-height: 85vh;
    background: transparent;
    padding: 0;
    margin: 0 auto; 
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal[aria-hidden="false"] .modal-content {
    transform: scale(1);
}

.modal-content img {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    margin: 0 auto;
}

.modal-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 3.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 10px;
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.1);
}

[data-theme="high-contrast"] .modal-content img {
    border: 2px solid #ffff00;
}

@media (max-width: 600px) {
    .modal-close {
        top: -50px;
        right: 0;
        font-size: 2.5rem;
    }
}

/* --- AUXILIARY CLASSES --- */
.icon-btn-award {background: var(--bg-body); color: var(--accent); border: none; padding: 8px; border-radius: 50%; cursor: pointer; display: inline-flex; transition: var(--transition); text-decoration: none;}
.icon-btn-award:hover { transform: scale(1.1); background: var(--accent); color: white; }

.sr-only {position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;}

.media-thumbnail {width: 260px; height: 260px; flex-shrink: 0; border-radius: 4px; overflow: hidden;}
.media-thumbnail img {width: 100%; height: 100%; object-fit: cover; }
/*
media-thumbnail .iframe-containe {width: 100%; height: 100%;}
.media-thumbnail iframe {position: absolute; inset: 0; width: 100%;  height: 100%;  border: 0;  transform: scale(2.5);  transform-origin: center;}
*/
.media-card:hover .media-thumbnail img {transform: scale(1.05);}

[data-theme="high-contrast"] .bio-card a, 
[data-theme="high-contrast"] .bio-card a strong,
[data-theme="high-contrast"] footer a,
[data-theme="high-contrast"] footer p a,
[data-theme="high-contrast"] .media-card a,     
[data-theme="high-contrast"] .media-info a,      
[data-theme="high-contrast"] .btn-outline,       
[data-theme="high-contrast"] .pub-item a,        
[data-theme="high-contrast"] .pub-text a,        
[data-theme="high-contrast"] p a {               
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    text-decoration: underline !important;
}

[data-theme="high-contrast"] .pub-icon,
[data-theme="high-contrast"] .award-icons a,
[data-theme="high-contrast"] .icon-btn-award {
    background: #222 !important;
    color: #ffff00 !important;
    border: 1px solid #ffff00 !important;
}

[data-theme="high-contrast"] .pub-item:hover .pub-icon,
[data-theme="high-contrast"] .award-icons a:hover,
[data-theme="high-contrast"] .icon-btn-award:hover,
[data-theme="high-contrast"] .stat-card:hover h3,
[data-theme="high-contrast"] .btn-outline:hover {
    background: #ffff00 !important;
    color: #000000 !important; 
}

[data-theme="high-contrast"] .pub-item:hover .pub-icon svg,
[data-theme="high-contrast"] .award-icons a:hover svg,
[data-theme="high-contrast"] .icon-btn-award:hover svg {
    stroke: #000000 !important;
    fill: none;
}


main > section:first-of-type {
    opacity: 1 !important;
    transform: none !important;
}
