@import url('https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0071e3;
    --primary-hover: #0077ED;
    --primary-dark: #004494;
    --secondary-color: #1d1d1f;
    --light-bg: #f5f5f7;
    --lighter-bg: #fbfbfd;
    --border-color: #d2d2d7;
    --text-muted: #86868b;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --info-color: #5AC8FA;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--secondary-color);
    overflow-x: hidden;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Header & Navbar */
.navbar {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    backdrop-filter: saturate(180%) blur(20px);
    background-color: rgba(255, 255, 255, 0.72);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: var(--secondary-color) !important;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.nav-link {
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    color: var(--secondary-color) !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: calc(100% - 2rem);
}

.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 500;
}

.badge {
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    background-color: var(--primary-color);
}

/* Hero Section */
.hero {
    padding: 100px 0 60px;
    background: linear-gradient(180deg, var(--lighter-bg) 0%, white 100%);
}

.gradient-text {
    background: linear-gradient(90deg, #0071e3 0%, #42a1ec 50%, #0071e3 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient 3s ease infinite;
}

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

.lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-muted);
}

.lead b {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Page Headers */
.page-header {
    background: linear-gradient(180deg, var(--lighter-bg) 0%, var(--light-bg) 100%);
    border-bottom: 1px solid var(--border-color);
}

.page-header .display-4 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.page-header .lead {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* Skills/Technologies Section */
.skills {
    background-color: var(--lighter-bg);
}

.tech-card {
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: white;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.tech-header {
    background: linear-gradient(135deg, var(--light-bg) 0%, white 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
}

.tech-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.tech-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.2);
}

.tech-img {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tech-item:hover .tech-img {
    transform: scale(1.15);
}

.tech-item p {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.cta .btn-light {
    background: white;
    color: var(--primary-color);
    border: none;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 980px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: var(--lighter-bg);
}

/* Blog Cards */
.blog-card {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.blog-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .card-img-top {
    transform: scale(1.08);
}

.blog-card .card-body {
    padding: 1.5rem;
}

.blog-card .badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 980px;
}

.blog-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.blog-card:hover .card-title {
    color: var(--primary-color);
}

.blog-card .card-text {
    color: var(--secondary-color);
    font-size: 1rem;
    line-height: 1.6;
}

.blog-card .btn-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1rem;
}

/* Setup Page */
.setup-overview-card {
    border: none;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, white 0%, var(--lighter-bg) 100%);
    overflow: hidden;
}

.setup-overview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--info-color) 100%);
}

.component-card, .peripheral-card {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.component-card:hover, .peripheral-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.component-icon, .peripheral-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--light-bg) 0%, white 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.component-card:hover .component-icon,
.peripheral-card:hover .peripheral-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: transparent;
    transform: rotate(-5deg);
}

.component-image, .peripheral-image {
    border-radius: 16px;
    overflow: hidden;
    margin-top: 1rem;
    background: var(--light-bg);
    position: relative;
    height: 200px;
}

.component-image img, .peripheral-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.component-card:hover .component-image img,
.peripheral-card:hover .peripheral-image img {
    transform: scale(1.1);
    padding: 0.5rem;
}

/* Indicador de clique para ampliar */
.component-image::after, .peripheral-image::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free', serif;
    font-weight: 900;
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.component-card:hover .component-image::after,
.peripheral-card:hover .peripheral-image::after {
    opacity: 1;
}

.component-image, .peripheral-image {
    cursor: zoom-in;
}

/* Contact Page */
.contact-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--info-color) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--light-bg) 0%, white 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.125rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border-color: transparent;
    transform: rotate(-5deg);
}

.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
    background-color: white;
}

.form-floating > label {
    color: var(--text-muted);
    font-size: 1rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
    font-weight: 500;
}

/* Footer */
footer {
    background: var(--secondary-color) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link {
    font-size: 1.25rem;
    margin-left: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.social-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-4px) rotate(-5deg);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 980px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    padding: 0.625rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 113, 227, 0.3);
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0;
    font-weight: 500;
}

.btn-link:hover {
    color: var(--primary-hover);
    transform: translateX(4px);
}

/* Pagination */
.pagination {
    gap: 0.5rem;
}

.page-link {
    color: var(--primary-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: var(--light-bg);
    border-color: var(--border-color);
}

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

.fadeIn {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 6px;
    border: 3px solid var(--light-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Seleção de texto */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

.alert-success {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--success-color);
}

.alert-dismissible .btn-close {
    padding: 1rem 1.5rem;
}

/* Loading states */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsividade */
@media (max-width: 992px) {
    .hero {
        padding: 80px 0 60px;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .display-5 {
        font-size: 2rem;
    }

    .page-header .display-4 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0 40px;
    }

    .tech-img {
        width: 50px;
        height: 50px;
    }

    .tech-card {
        border-radius: 16px;
    }

    .component-image, .peripheral-image {
        height: 150px;
    }

    .component-image img, .peripheral-image img {
        padding: 0.75rem;
    }

    .social-link {
        margin-left: 0.75rem;
    }

    .navbar {
        padding: 0.5rem 0;
    }

    .page-header {
        padding: 3rem 0;
    }

    .page-header .display-4 {
        font-size: 2rem;
    }

    .page-header .lead {
        font-size: 1.125rem;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 40px 0 30px;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }

    .tech-header h3 {
        font-size: 1rem;
    }

    .blog-card .card-title {
        font-size: 1.125rem;
    }

    .btn {
        font-size: 1rem;
    }

    .form-control, .form-select {
        font-size: 1rem;
    }
}

/* Modo escuro suporte (opcional) */
@media (prefers-color-scheme: dark) {
    /* Adicione estilos para modo escuro aqui se desejar */
}