/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --bg-1: #0f172a;
    --bg-2: #111827;
    --bg-3: #1e293b;
    --surface: rgba(15, 23, 42, 0.72);
    --surface-strong: rgba(15, 23, 42, 0.9);
    --border: rgba(96, 165, 250, 0.22);
    --border-strong: rgba(96, 165, 250, 0.38);
    --text: #e5eefc;
    --text-soft: #b8c7e6;
    --text-muted: #93a8cf;
    --primary: #60a5fa;
    --primary-strong: #3b82f6;
    --accent: #22d3ee;
    --success: #4ade80;
    --error: #f87171;
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.22);
    --radius: 18px;
    --radius-sm: 12px;
    --max-width: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 28%),
        linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Desliga fundo decorativo pesado */
body::before,
body::after,
.floating-particles {
    display: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout base */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 64px 20px 52px;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.78) 0%,
        rgba(15, 23, 42, 0.52) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-section {
    max-width: 700px;
    margin: 0 auto;
}

.profile-image {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    border: 3px solid rgba(96, 165, 250, 0.9);
    box-shadow:
        0 0 0 8px rgba(96, 165, 250, 0.08),
        0 18px 32px rgba(0, 0, 0, 0.28);
    margin: 0 auto 22px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.profile-image:hover {
    transform: translateY(-2px) scale(1.015);
    box-shadow:
        0 0 0 8px rgba(96, 165, 250, 0.1),
        0 20px 34px rgba(0, 0, 0, 0.32);
}

.main-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #9cc7ff 55%, #67e8f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    color: var(--text-soft);
    margin-bottom: 8px;
    font-weight: 500;
}

.tagline {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.02rem;
    color: var(--text-muted);
}

/* Navigation */
.navigation {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 15, 30, 0.86);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 14px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 20px;
    flex-wrap: wrap;
}

.nav-link {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: rgba(96, 165, 250, 0.08);
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.38);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    outline: none;
}

/* Sections */
.about-section,
.projects-section,
.contact-section {
    padding: 84px 0;
}

.about-section {
    background: rgba(255, 255, 255, 0.015);
}

.projects-section {
    background: rgba(255, 255, 255, 0.01);
}

.contact-section {
    background: rgba(255, 255, 255, 0.015);
}

.section-title {
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #9cc7ff 60%, #67e8f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    width: 72px;
    height: 4px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* About */
.bio-content {
    text-align: center;
    max-width: 840px;
    margin: 0 auto;
}

.bio-text {
    font-size: 1.08rem;
    color: var(--text-soft);
    margin-bottom: 22px;
    line-height: 1.85;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-top: 42px;
}

.skill-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background-color 0.22s ease;
    box-shadow: var(--shadow-sm);
}

.skill-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    background: rgba(15, 23, 42, 0.84);
}

.skill-card i {
    font-size: 2.4rem;
    color: var(--primary);
    margin-bottom: 18px;
}

.skill-card h3 {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.skill-card p {
    color: var(--text-soft);
    font-size: 0.98rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 44px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background-color 0.22s ease;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.project-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    background: rgba(15, 23, 42, 0.84);
}

.project-icon {
    text-align: center;
    margin-bottom: 18px;
}

.project-icon i {
    font-size: 2.5rem;
    color: var(--primary);
}

.project-title {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.project-description {
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: 18px;
    font-size: 0.98rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background: rgba(59, 130, 246, 0.14);
    color: #dbeafe;
    border: 1px solid rgba(96, 165, 250, 0.18);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.project-links {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.16);
    color: #eff6ff;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    border: 1px solid rgba(96, 165, 250, 0.2);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.project-link:hover,
.project-link:focus-visible {
    transform: translateY(-1px);
    background: rgba(59, 130, 246, 0.24);
    border-color: rgba(96, 165, 250, 0.4);
    box-shadow: var(--shadow-sm);
    outline: none;
}

.project-link i {
    font-size: 0.9rem;
}

/* Contact */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.7rem;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.contact-info p {
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 28px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
    text-decoration: none;
    padding: 15px 16px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.contact-link:hover,
.contact-link:focus-visible {
    transform: translateX(4px);
    background: rgba(15, 23, 42, 0.82);
    border-color: var(--border-strong);
    box-shadow: var(--shadow-sm);
    outline: none;
}

.contact-link i {
    font-size: 1.15rem;
    color: var(--primary);
}

#emailLink {
    cursor: copy;
}

#emailLink:hover {
    cursor: copy;
}

.email-text {
    transition: opacity 0.2s ease;
}

.copy-confirmation {
    position: absolute;
    right: 14px;
    background: rgba(74, 222, 128, 0.14);
    color: #dcfce7;
    border: 1px solid rgba(74, 222, 128, 0.24);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

#emailLink.copied .email-text {
    opacity: 0.7;
}

#emailLink.copied .copy-confirmation {
    opacity: 1;
    transform: translateX(0);
}

/* Form */
.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 34px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-weight: 600;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(2, 6, 23, 0.42);
    color: #ffffff;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #0f172a;
    color: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #89a2cc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.56);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
    background: rgba(2, 6, 23, 0.56);
}

.country-indicator {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.country-indicator.show {
    opacity: 1;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-strong), var(--accent));
    color: #ffffff;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.22);
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.26);
    filter: brightness(1.03);
}

.submit-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

/* Form Status */
.form-status {
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-status.success {
    background: rgba(74, 222, 128, 0.12);
    color: #bbf7d0;
    border: 1px solid rgba(74, 222, 128, 0.24);
    display: block;
}

.form-status.error {
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.24);
    display: block;
}

.form-status.loading {
    background: rgba(96, 165, 250, 0.12);
    color: #dbeafe;
    border: 1px solid rgba(96, 165, 250, 0.24);
    display: block;
}

/* Footer */
.footer {
    background: rgba(2, 6, 23, 0.85);
    color: white;
    text-align: center;
    padding: 28px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
    font-size: 0.96rem;
    opacity: 0.82;
}

/* Responsive */
@media (max-width: 900px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 18px;
    }

    .header {
        padding: 52px 18px 42px;
    }

    .profile-image {
        width: 126px;
        height: 126px;
    }

    .nav-list {
        gap: 10px;
        padding: 12px 14px;
    }

    .nav-link {
        padding: 9px 14px;
        font-size: 0.95rem;
    }

    .about-section,
    .projects-section,
    .contact-section {
        padding: 68px 0;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .project-card,
    .contact-form {
        padding: 24px;
    }
}

@media (max-width: 560px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .section-title {
        margin-bottom: 42px;
    }

    .project-card,
    .contact-form,
    .skill-card {
        padding: 20px;
    }

    .project-title {
        font-size: 1.18rem;
    }

    .bio-text,
    .contact-info p {
        font-size: 1rem;
    }

    .contact-link {
        padding: 13px 14px;
    }

    .submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 375px) {
    .container {
        padding: 0 14px;
    }

    .header {
        padding: 44px 14px 36px;
    }

    .profile-image {
        width: 104px;
        height: 104px;
    }

    .nav-link {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .tech-tag {
        font-size: 0.74rem;
        padding: 6px 10px;
    }

    .project-link {
        width: 100%;
        justify-content: center;
    }
}

/* Acessibilidade e desempenho */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
