:root {
    /* Colors - Dark Theme */
    --bg-color: #0a0a0a;
    --card-bg: #111111;
    --card-hover: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-orange: #ff5722;
    --accent-glow: #ff8a65;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
    --spacing-section: 8rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* BACKGROUND GRADIENTS */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(45deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a0a 100%);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

/* PARTICLES CONTAINER */
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: radial-gradient(circle, var(--accent-orange), transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: float-particles linear forwards;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out alternate, pulse-glow 6s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow), transparent);
    top: -100px;
    left: 20%;
    animation-delay: 0s, 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-orange), transparent);
    bottom: -100px;
    right: 10%;
    animation-delay: -5s, 1s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-orange), transparent);
    top: 30%;
    right: 5%;
    animation-delay: -10s, 2s;
}

.orb-4 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-glow), transparent);
    bottom: 10%;
    left: 30%;
    animation-delay: -15s, 3s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(80px, 80px); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse-glow {
    0% { opacity: 0.5; filter: blur(150px) brightness(1); }
    50% { opacity: 0.8; filter: blur(130px) brightness(1.2); }
    100% { opacity: 0.5; filter: blur(150px) brightness(1); }
}

@keyframes float-particles {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(100vh) translateX(var(--offset-x, 0)); opacity: 0; }
}

/* LAYOUT UTILS */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--spacing-section) 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

/* TYPOGRAPHY */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
}

h1 { font-size: 4.5rem; letter-spacing: -0.02em; }
h2 { 
    font-size: 3rem; 
    margin-bottom: 3rem; 
    text-align: center; 
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    display: inline-block;
    width: 100%;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent-orange);
    margin: 0.5rem auto 0;
    animation: slideWidth 0.8s ease-out 0.3s forwards;
    opacity: 0;
}
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

h5 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* ============================================================
   NAVBAR
   ============================================================ */
header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-glow);
    animation: slideWidth 0.8s ease-out 0.3s forwards;
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-glow);
    transition: width 0.3s ease;
}

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-glow);
}

/* ============================================================
   LANGUAGE TOGGLE
   ============================================================ */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.lang-toggle:hover {
    border-color: var(--accent-orange);
    color: var(--accent-glow);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-arrow {
    width: 10px;
    height: 6px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.lang-toggle.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-toggle.open {
    border-color: var(--accent-orange);
    color: var(--accent-glow);
}

/* Dropdown */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.lang-toggle.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.lang-option:hover {
    background: var(--card-hover);
    color: var(--text-primary);
}

.lang-option.active {
    color: var(--accent-glow);
    background: rgba(255, 138, 101, 0.08);
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-link {
    font-size: 1.2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-content {
    max-width: 800px;
}

.hero-title {
    background: linear-gradient(180deg, #111, #555);
    -webkit-background-clip: text;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
    display: inline-block;
    max-width: 100%;
    overflow: visible;
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
}

.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent-glow);
    margin-left: 2px;
    animation: cursor-blink 1s infinite;
    vertical-align: middle;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.ripple {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to { transform: scale(4); opacity: 0; }
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-color);
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

.btn-secondary:hover {
    border-color: var(--accent-glow);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 138, 101, 0.2);
    color: var(--accent-glow);
}

/* ============================================================
   ABOUT — layout esquerda + foto direita
   ============================================================ */
.about-layout {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: justify;
    hyphens: auto;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Foto circular */
.about-photo-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-photo-ring {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-glow), transparent 60%);
    animation: spin-ring 8s linear infinite;
}

@keyframes spin-ring {
    from { background: linear-gradient(0deg, var(--accent-orange), var(--accent-glow), transparent 60%); }
    to   { background: linear-gradient(360deg, var(--accent-orange), var(--accent-glow), transparent 60%); }
}

.about-photo-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--bg-color);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Placeholder quando sem foto */
.about-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    padding: 1rem;
}

.about-photo-placeholder svg {
    width: 60px;
    height: 60px;
    opacity: 0.5;
}

/* ============================================================
   TECH MARQUEE
   ============================================================ */
.tech-marquee-wrapper {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: -2rem;
}

.marquee-title {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0.8;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.tech-marquee-container {
    width: 70%;
    margin: 0 auto;
    overflow: hidden;
    background: linear-gradient(90deg, var(--bg-color) 0%, rgba(0,0,0,0.02) 20%, rgba(0,0,0,0.02) 80%, var(--bg-color) 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: relative;
    user-select: none;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.tech-marquee {
    display: flex;
    overflow: hidden;
    width: 100%;
}

.marquee-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: marquee-scroll 60s linear infinite;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: default;
}

.tech-item i {
    font-size: 2rem;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.tech-icon-svg {
    width: 2rem;
    height: 2rem;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.tech-item span {
    font-weight: 500;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    opacity: 0.7;
    text-transform: uppercase;
}

.tech-item:hover { color: var(--text-primary); }

.tech-item:hover i,
.tech-item:hover .tech-icon-svg {
    filter: grayscale(0%) brightness(1);
    opacity: 1;
    color: var(--accent-orange);
    stroke: var(--accent-orange);
}

.tech-item:hover span {
    opacity: 1;
    color: var(--accent-glow);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.33%); }
}

/* ============================================================
   CARDS (Projects & Blog)
   ============================================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 138, 101, 0.1) 0%, transparent 70%);
    transition: all 0.6s ease;
    pointer-events: none;
}

.card:hover::before { top: -30%; left: -30%; }

.card:hover {
    background: var(--card-hover);
    border-color: var(--accent-orange);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 138, 101, 0.2);
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card h3 { margin-bottom: 1rem; color: var(--text-primary); }

.card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    text-align: justify;
    hyphens: auto;
}

.card-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-glow);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    position: relative;
}

.card-link:hover {
    gap: 10px;
    color: #fff;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent-orange);
    border: 1px solid var(--accent-orange);
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    width: fit-content;
}

.tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.tags-wrapper .tag { margin-bottom: 0; }

.tag-muted {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.award-highlight {
    display: block;
    font-size: 0.75rem;
    color: var(--accent-glow);
    margin-bottom: 0.8rem;
    margin-top: -0.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* GRIDS */
.projects-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.blog-grid     { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cert-grid     { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ============================================================
   CERTIFICADOS
   ============================================================ */
.cert-card {
    text-decoration: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 180px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cert-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 138, 101, 0.15);
}

.cert-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.cert-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    margin-top: auto;
}

.cert-obs {
    font-size: 0.8rem;
    color: var(--accent-orange);
    margin-top: 0.5rem;
    display: block;
}

.cert-card:hover h3 { color: var(--accent-glow); }
.cert-card:hover p  { color: var(--text-primary); }

/* ============================================================
   MODAL
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.3s, opacity 0.3s ease;
}

.modal.active {
    display: flex;
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 900px;
    height: 85vh;
    max-height: 85vh;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--accent-orange);
    color: #fff;
    transform: rotate(90deg);
}

#pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.modal-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

#img-frame {
    max-width: 100%;
    max-height: 100%;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    margin-top: 4rem;
    text-align: center;
}

.footer-quote {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-links a:hover { color: var(--accent-glow); }

.footer-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 1.5rem auto 1rem;
    display: block;
    border: 3px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

/* ============================================================
   INSTRUCTION
   ============================================================ */
.section-instruction {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    margin-top: -2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.section-instruction .icon {
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
    60% { transform: translateY(-3px); }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideWidth {
    to { width: 100%; }
}

@keyframes cursor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.animate-hidden {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(2px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-show {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.grid .animate-show:nth-child(2) { transition-delay: 0.1s; }
.grid .animate-show:nth-child(3) { transition-delay: 0.2s; }
.grid .animate-show:nth-child(4) { transition-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }
    .tech-marquee-container { width: 90%; }
    .about-photo-ring { width: 220px; height: 220px; }
}

@media (max-width: 768px) {
    .nav-links   { display: none; }
    .mobile-menu-btn { display: flex; }
    
    h1 { font-size: 2.8rem; }
    
    /* About: empilha verticalmente no mobile */
    .about-layout {
        flex-direction: column-reverse;
        gap: 2.5rem;
    }

    .about-text { text-align: left; }

    .about-photo-ring {
        width: 180px;
        height: 180px;
    }

    .tech-marquee-container { 
        width: 100%;
        mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .btn { width: 100%; text-align: center; }
    
    .orb-1 { width: 300px; height: 300px; left: 0; }
    .orb-2 { width: 250px; height: 250px; right: 0; }

    .modal-content {
        width: 90%;
        max-height: 80vh;
        border-radius: 12px;
        margin: auto;
    }

    .modal.mode-image .modal-content { height: auto; }
    .modal.mode-pdf   .modal-content { height: 80vh; }
    
    .close-modal {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        backdrop-filter: blur(4px);
    }

    .modal-media { max-height: 80vh; background: transparent; }

    /* Language toggle no mobile: esconder label, manter ícone */
    .lang-label { display: none; }
    .lang-arrow { display: none; }
    .lang-toggle { padding: 0.35rem 0.5rem; }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    .container { padding: 0 1.5rem; }
}
