:root {
    --bg-primary: #050508;
    --bg-primary-transparent: rgba(5, 5, 8, 0);
    --bg-primary-20: rgba(255, 255, 255, 0.06);
    --bg-primary-60: rgba(5, 5, 8, 0.6);
    --bg-secondary: #0f0f14;
    --bg-tertiary: #1a1a22;
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --accent: #0A84FF;
    --border: rgba(255, 255, 255, 0.08);

    /* Liquid Glass tokens */
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-bg-hover: rgba(255, 255, 255, 0.11);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-border-top: rgba(255, 255, 255, 0.35);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.15);
    --glass-glow: 0 0 40px rgba(255, 255, 255, 0.04);
    --iridescent: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(100,180,255,0.08) 40%, rgba(200,120,255,0.08) 70%, rgba(255,255,255,0.05) 100%);

    --text-detail: rgba(255, 255, 255, 0.85);
    --modal-header-bg: rgba(5, 5, 8, 0.75);
    --close-hover: rgba(255, 255, 255, 0.1);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0,0,0,0.4);
}

body.light-theme {
    --bg-primary: #e8e8f0;
    --bg-primary-transparent: rgba(232, 232, 240, 0);
    --bg-primary-20: rgba(0, 0, 0, 0.04);
    --bg-primary-60: rgba(232, 232, 240, 0.6);
    --bg-secondary: rgba(255, 255, 255, 0.5);
    --bg-tertiary: rgba(210, 210, 220, 0.5);
    --text-primary: #0a0a14;
    --text-secondary: rgba(10, 10, 20, 0.55);
    --border: rgba(0, 0, 0, 0.07);

    /* Liquid Glass light tokens */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-bg-hover: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-border-top: rgba(255, 255, 255, 1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255,255,255,0.9);
    --glass-glow: 0 0 40px rgba(255, 255, 255, 0.3);
    --iridescent: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(100,180,255,0.2) 40%, rgba(200,120,255,0.15) 70%, rgba(255,255,255,0.4) 100%);
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0,0,0,0.08);

    --text-detail: rgba(0, 0, 0, 0.85);
    --modal-header-bg: rgba(255, 255, 255, 0.7);
    --close-hover: rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

html {
    scroll-behavior: smooth;
}

#projects, #about, #experiences,
#about-project, #screenshots, #what-app-does, #main-tools, #contributors {
    scroll-margin-top: 65px;
}

a.navbar-brand {
    text-decoration: none;
    color: var(--text-primary);
}

.navbar-back {
    display: flex;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar-back:hover {
    color: var(--text-primary);
}

.navbar-back .material-icons {
    font-size: 1.2rem;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 0 var(--glass-border-top), var(--glass-shadow);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.navbar-brand {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.navbar-links {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-item {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0.7;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.nav-item:hover {
    opacity: 1;
    background-color: var(--text-primary);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-divider {
    width: 1px; 
    height: 14px; 
    background-color: var(--border); 
    margin: 0 6px;
}

.nav-action-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    position: static;
}

/* By default, show full labels and hide short ones */
.nav-label-short {
    display: none;
}

.nav-label-full {
    display: inline;
}

/* Utilities */
.material-icons {
    font-size: 1.1em;
    vertical-align: middle;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

hr.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Header / Hero Home */
.home-hero {
    padding: 120px 0 60px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}



.home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            var(--bg-primary-transparent) 0%,
            var(--bg-primary-transparent) 85%,
            var(--bg-primary-20) 90%,
            var(--bg-primary-60) 96%,
            var(--bg-primary) 100%);
    pointer-events: none;
    z-index: 1;
}

.home-hero .container {
    position: relative;
    z-index: 10;
    width: 100%;
}

.profile-container {
    position: relative;
    margin-bottom: 24px;
}

.profile-img {
    width: 175px;
    height: 175px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

/* Typography Home */
.title {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.1;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 600px;
    margin-bottom: 32px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin-left: auto;
    margin-right: auto;
}

body.light-theme .title,
body.light-theme .subtitle {
    text-shadow: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(160deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.06) 100%);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--iridescent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.btn-primary:hover {
    transform: scale(1.04) translateY(-1px);
    box-shadow: var(--glass-shadow), 0 8px 24px rgba(255,255,255,0.06);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-glass {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.btn-glass::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, var(--glass-border-top) 0%, transparent 100%);
    opacity: 0.12;
    border-radius: var(--radius-full) var(--radius-full) 0 0;
    pointer-events: none;
}

.btn-glass:hover {
    background: var(--glass-bg-hover);
    transform: scale(1.04) translateY(-1px);
    box-shadow: var(--glass-shadow), var(--glass-glow);
}

.btn-accent {
    background: linear-gradient(135deg, rgba(10,132,255,0.9) 0%, rgba(100,180,255,0.7) 100%);
    color: #FFF;
    border: 1px solid rgba(100, 180, 255, 0.4);
    box-shadow: 0 4px 20px rgba(10, 132, 255, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-accent:hover {
    transform: scale(1.04) translateY(-1px);
    box-shadow: 0 8px 32px rgba(10, 132, 255, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}

.controls-top-right {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    gap: 12px;
    z-index: 50;
}

.controls-top-right .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
    position: static;
}

/* Contact Links */
.contact-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Sections */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--text-secondary);
    opacity: 0.35;
}

/* Grid & Cards (App Store Style) */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    position: relative;
    background: var(--glass-bg);
    background-image: var(--iridescent);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border-top), transparent);
    z-index: 2;
}

.card:hover {
    transform: scale(1.02) translateY(-6px);
    box-shadow: var(--shadow-soft), 0 0 0 1px var(--glass-border), var(--glass-glow);
    border-color: rgba(255, 255, 255, 0.28);
}

.card-img-wrapper {
    height: 200px;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-tertiary);
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.badge-appstore {
    position: absolute;
    top: 16px;
    right: 16px;
    height: 34px;
    width: auto;
    z-index: 10;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tag {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 500;
}

/* --- Details Page (projeto.html) --- */

.hero-detail {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding: 60px 40px;
}

.hero-detail::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-detail h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.toolbar-top {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 20;
    display: flex;
    gap: 16px;
}

.detail-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.detail-section {
    margin-bottom: 18px;
}

.detail-section h2 {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 32px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 20px;
}

.detail-section h2::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--text-secondary);
    opacity: 0.35;
}

.detail-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-detail);
    white-space: pre-wrap;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.team-card {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(255, 255, 255, 0.2);
}

.team-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.team-info {
    flex: 1;
}

.team-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.team-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.link-icon {
    color: var(--text-secondary);
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.team-card:hover .link-icon {
    opacity: 1;
}

/* Screenshots */
.screenshots-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    margin-top: 24px;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for cleaner look */
.screenshots-container::-webkit-scrollbar {
    display: none;
}

.screenshot-item {
    flex: 0 0 80%;
    max-width: 320px;
    border-radius: var(--radius-md);
    overflow: hidden;
    scroll-snap-align: center;
}

.screenshot-item img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.screenshot-item.starbits-img {
    max-width: 600px;
    flex: 0 0 90%;
}

/* Video Preview */
.video-preview-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 40px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.video-preview-wrapper video {
    width: 100%;
    max-width: 900px;
    display: block;
}

/* CTA Bottom */
.cta-bottom {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    margin-top: 18px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.cta-bottom h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.cta-bottom p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modals (Apple Sheet Style) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 20px;
    opacity: 1;
    /* Animation controlled in JS or classes, simple fallback */
}

/* Use transition for enter */
.modal-enter-active,
.modal-leave-active {
    transition: opacity 0.3s ease;
}

.modal-enter-from,
.modal-leave-to {
    opacity: 0;
}

.modal-sheet {
    background-color: var(--bg-secondary);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
    position: sticky;
    top: 0;
    background-color: var(--modal-header-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 20px 32px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.modal-close {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--close-hover);
}

.modal-body {
    padding: 32px;
}

.modal-body h2 {
    font-size: 2.2rem;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.modal-body h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    margin-top: 48px;
    letter-spacing: -0.01em;
}

.timeline-item {
    position: relative;
    padding-left: 28px;
    margin-bottom: 32px;
    border-left: 2px solid var(--bg-tertiary);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent);
}

.timeline-title {
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.timeline-meta {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.timeline-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-detail);
}

/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(60px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        transform: translateY(24px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }

    header {
        padding: 80px 0 40px 0;
    }

    .hero-detail {
        height: 40vh;
        min-height: 300px;
        padding: 40px 24px;
    }

    .hero-detail h1 {
        font-size: 2.5rem;
    }

    .toolbar-top {
        top: 20px;
        left: 20px;
    }

    .controls-top-right {
        top: 16px;
        right: 16px;
    }

    .controls-top-right .btn {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .detail-main {
        padding: 40px 16px;
    }

    .modal-sheet {
        max-height: 95vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        position: absolute;
        bottom: 0;
        border-bottom: none;
    }

    /* Navbar mobile */
    .navbar-container {
        padding: 6px 12px;
        gap: 6px;
        flex-wrap: nowrap;
    }

    .navbar-brand {
        display: none;
    }

    .navbar-links {
        gap: 4px;
        flex-wrap: nowrap;
        width: 100%;
        justify-content: space-between;
    }

    .nav-item {
        font-size: 0.72rem;
        padding: 4px 8px;
    }

    .nav-divider {
        margin: 0 2px;
        height: 12px;
    }

    .nav-action-btn {
        padding: 4px 6px;
        font-size: 0.72rem;
        min-width: unset;
    }

    .nav-action-btn .material-icons {
        font-size: 0.85rem !important;
        margin-right: 0 !important;
    }

    /* On project page mobile: hide "Back to Home" text, show only icon */
    .navbar-back-text {
        display: none;
    }

    /* Switch to short labels on mobile */
    .nav-label-full {
        display: none;
    }

    .nav-label-short {
        display: inline;
    }

    /* Hide Features button on mobile — it's covered by About */
    .nav-hide-mobile {
        display: none !important;
    }
}