:root {
    --bg-color: #2b303b;
    --sidebar-bg: #22262f;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #3f4451;
    --card-bg: #353b47;
    --hover-bg: #3f4654;
    --accent: #cbd5e1;
    --primary: #fb923c; /* Orange accent from ref */
    --secondary: #a3e635; /* Green accent from ref */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Layout */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 3rem;
}

.brand-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    margin-bottom: 1rem;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--text-main);
}

.brand-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.sidebar-section {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

.side-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.side-link:hover {
    background-color: var(--hover-bg);
    color: var(--text-main);
}

.sidebar-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.sidebar-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.sidebar-footer a:hover {
    color: var(--text-main);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px; /* Offset for sidebar */
    padding: 4rem;
}

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

/* Typography */
.massive-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    color: var(--text-main);
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.bio-large {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 600px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.section-divider {
    margin-top: 4rem;
}

/* Bento Box Home Layout */
.hero-bento {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.avatar-small {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid var(--border-color);
}

.bento-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-box h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-box span {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bento-skills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.skill-card {
    padding: 2rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.skill-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.skill-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
    color: #111;
}

.skill-orange {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.skill-orange h3, .skill-green h3 {
    color: var(--text-main);
}

.skill-green {
    background-color: var(--card-bg);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

/* Recent Projects List (Home) */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.recent-item:hover {
    background: var(--hover-bg);
    transform: translateX(5px);
}

.recent-icon {
    font-size: 1.5rem;
    margin-right: 1.5rem;
    background: var(--hover-bg);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.recent-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.recent-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.recent-arrow {
    margin-left: auto;
    color: var(--text-muted);
}

/* Projects Page (Ecosystem Layout) */
.ecosystem-layout {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.ecosystem-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.ecosystem-card {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.ecosystem-card:hover {
    background: var(--card-bg);
}

.eco-icon {
    font-size: 1.25rem;
    margin-right: 1rem;
    opacity: 0.7;
}

.eco-details {
    flex: 1;
}

.eco-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.eco-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.eco-stars {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* Experience List (About) */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-left: 2px solid var(--border-color);
    padding-left: 2rem;
    margin-left: 1rem;
}

.exp-item {
    position: relative;
}

.exp-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 2px solid var(--bg-color);
}

.exp-item h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.exp-item p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.exp-date {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.tool-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-card strong {
    font-size: 1.1rem;
}

.tool-card span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    background: #1a1e24; /* Fundo mais escuro para contraste */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00FF88; /* Verde neon do tema */
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.15); /* Glow suave */
    background: #121212;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--text-main);
    color: var(--bg-color);
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: opacity 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    background-color: var(--text-main);
    color: var(--bg-color);
}

.btn:hover {
    opacity: 0.9;
}

.loading {
    color: var(--text-muted);
    padding: 2rem 0;
    font-style: italic;
}

.error {
    color: #fca5a5;
    background: #451a1a;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #7f1d1d;
}

.page-fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 200;
}

@media (max-width: 900px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 1.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        background-color: var(--sidebar-bg);
    }
    .hamburger {
        display: block;
    }
    .sidebar-header {
        margin-bottom: 0;
        z-index: 200;
    }
    .brand-name {
        font-size: 1.2rem;
    }
    .brand-title {
        display: none;
    }
    .sidebar-links {
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--bg-color); /* Fundo 100% sólido */
        z-index: 150;
        gap: 2.5rem;
    }
    .sidebar-links.open {
        display: flex;
        animation: fadeIn 0.3s ease-out;
    }
    .sidebar-section {
        display: none;
    }
    .side-link {
        font-size: 1.75rem; /* Menor para caber textos longos */
        font-weight: 700;
        text-align: center; /* Centralizado */
        line-height: 1.3;
        padding: 0.5rem;
    }
    .sidebar-footer {
        display: none;
    }
    .main-content {
        margin-left: 0;
        padding: 2rem 1.25rem;
    }
    .massive-title {
        font-size: 2.5rem;
    }
    .bento-stats {
        grid-template-columns: 1fr;
    }
    .bento-skills {
        grid-template-columns: 1fr;
    }
    .form-row {
        flex-direction: column;
    }
}

/* Spinner Animation */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
}

.spinner-dark {
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-top-color: var(--bg-color);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    width: 100%;
    gap: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}
