/* ==========================================================================
   NEUMORPHIC PORTFOLIO - FÚLVIO TANURE
   CSS GLOBAL STYLING & DESIGN SYSTEM
   ========================================================================== */

/* --- Custom Variables & Theme Systems --- */
:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transition speeds */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Theme Colors (Defaults to Dark Theme) */
    --bg-color: #1a1e24;
    --card-color: #1a1e24;
    
    /* Text colors */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    /* Accents (AI Glowing Colors) */
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    
    /* Neumorphic Shadows (Calibrated for Dark Theme) */
    --shadow-flat: 0px 0px 0px rgba(0,0,0,0);
    --shadow-out: 8px 8px 16px rgba(0, 0, 0, 0.4), -8px -8px 16px rgba(255, 255, 255, 0.03);
    --shadow-out-hover: 12px 12px 24px rgba(0, 0, 0, 0.5), -12px -12px 24px rgba(255, 255, 255, 0.05);
    --shadow-in: inset 5px 5px 10px rgba(0, 0, 0, 0.4), inset -5px -5px 10px rgba(255, 255, 255, 0.03);
    --shadow-out-sm: 4px 4px 8px rgba(0, 0, 0, 0.4), -4px -4px 8px rgba(255, 255, 255, 0.02);
    --shadow-in-sm: inset 3px 3px 6px rgba(0, 0, 0, 0.4), inset -3px -3px 6px rgba(255, 255, 255, 0.02);
    
    /* Overlay glass */
    --glass-bg: rgba(26, 30, 36, 0.8);
    --glass-border: rgba(255, 255, 255, 0.03);
}

/* --- Light Theme Variables --- */
body.light-theme {
    color-scheme: only light;
    --bg-color: #e6eef8;
    --card-color: #e6eef8;
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --accent-indigo: #4f46e5;
    --accent-purple: #7c3aed;
    --accent-pink: #db2777;
    --accent-cyan: #0891b2;
    --accent-gradient: linear-gradient(135deg, #4f46e5, #7c3aed, #db2777);

    /* Neumorphic Shadows (Calibrated for Light Theme - Soft Blue Tint) */
    --shadow-out: 8px 8px 16px rgba(163, 177, 198, 0.55), -8px -8px 16px rgba(255, 255, 255, 0.85);
    --shadow-out-hover: 12px 12px 24px rgba(163, 177, 198, 0.7), -12px -12px 24px rgba(255, 255, 255, 0.95);
    --shadow-in: inset 5px 5px 10px rgba(163, 177, 198, 0.55), inset -5px -5px 10px rgba(255, 255, 255, 0.85);
    --shadow-out-sm: 4px 4px 8px rgba(163, 177, 198, 0.45), -4px -4px 8px rgba(255, 255, 255, 0.8);
    --shadow-in-sm: inset 3px 3px 6px rgba(163, 177, 198, 0.45), inset -3px -3px 6px rgba(255, 255, 255, 0.8);

    --glass-bg: rgba(230, 238, 248, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
}

/* --- Dark Theme Specific Rule --- */
body.dark-theme {
    color-scheme: only dark;
}

/* --- Basic CSS Reset & Structure --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    position: relative;
}

/* --- Glowing Background Orbs --- */
.glow-bg {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    z-index: -1;
    opacity: 0.15;
    pointer-events: none;
    transition: opacity var(--transition-slow);
}

body.light-theme .glow-bg {
    opacity: 0.08;
}

.glow-1 {
    top: 5%;
    left: -10%;
    background: radial-gradient(circle, var(--accent-indigo) 0%, transparent 70%);
}

.glow-2 {
    top: 55%;
    right: -10%;
    background: radial-gradient(circle, var(--accent-pink) 0%, transparent 70%);
}

/* --- Typography Helpers --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* --- Global Layout Containers --- */
.container-width {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

/* --- Neumorphic Core Utility Classes --- */
.btn-neu {
    background-color: var(--card-color);
    border-radius: 20px;
    box-shadow: var(--shadow-out);
    border: 1px solid var(--glass-border);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-normal);
}

.btn-neu:hover {
    box-shadow: var(--shadow-out-hover);
}

.btn-neu.inset {
    box-shadow: var(--shadow-in) !important;
}

.btn-neu.inset:hover {
    box-shadow: var(--shadow-in) !important;
}

/* --- Buttons System --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 20px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff !important;
    box-shadow: var(--shadow-out);
    border: none;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 2;
    border-radius: 20px 20px 0 0;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    filter: blur(15px);
    border-radius: 20px;
    z-index: -1;
    transition: opacity var(--transition-normal);
}

.btn-primary .btn-icon {
    transition: transform var(--transition-fast) ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-out-hover), 0 10px 20px rgba(124, 58, 237, 0.25);
    color: #ffffff !important;
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.btn-primary:hover .btn-icon-send {
    transform: translate(3px, -3px);
}

.btn-primary:hover::after {
    opacity: 0.35;
}

.btn-primary:active, .btn-primary.active {
    box-shadow: var(--shadow-in) !important;
    transform: translateY(-1px);
}

.btn-primary:active::after {
    opacity: 0;
}

.btn-secondary {
    color: var(--text-secondary);
    box-shadow: var(--shadow-out);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-out-hover);
}

.btn-secondary:active {
    box-shadow: var(--shadow-in) !important;
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

/* --- Colorless Raised Button with Debossed (Low-Relief) Text --- */
.btn-creations {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    /* Springy snappy transition for perfect click bounce */
    transition: transform 0.12s cubic-bezier(0.25, 0.8, 0.25, 1), 
                box-shadow 0.12s cubic-bezier(0.25, 0.8, 0.25, 1),
                background-color 0.12s ease;
}

.btn-creations .btn-text {
    background: transparent;
    transition: color 0.12s ease, text-shadow 0.12s ease;
}

/* Light Theme - Sunken / Debossed text shadow rules */
body.light-theme .btn-creations .btn-text {
    color: rgba(71, 85, 105, 0.75);
    text-shadow: -1px -1px 0px rgba(0, 0, 0, 0.18), 1px 1px 0px rgba(255, 255, 255, 0.95);
}

/* Dark Theme - Sunken / Debossed text shadow rules */
body:not(.light-theme) .btn-creations .btn-text {
    color: rgba(156, 163, 175, 0.6);
    text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.55), 1px 1px 0px rgba(255, 255, 255, 0.08);
}

/* Hover effects */
.btn-creations:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-out-hover);
}

body.light-theme .btn-creations:hover .btn-text {
    color: var(--accent-purple);
    text-shadow: -0.5px -0.5px 0px rgba(0, 0, 0, 0.1), 0.5px 0.5px 0px rgba(255, 255, 255, 0.8);
}

body:not(.light-theme) .btn-creations:hover .btn-text {
    color: var(--accent-cyan);
    text-shadow: -0.5px -0.5px 0px rgba(0, 0, 0, 0.3), 0.5px 0.5px 0px rgba(255, 255, 255, 0.05);
}

/* Sunken / Low-Relief (Debossed) Active State on Click */
.btn-creations:active {
    box-shadow: var(--shadow-in) !important;
    transform: translateY(2px) scale(0.97); /* compresses like a physical switch */
    transition: transform 0.05s ease, box-shadow 0.05s ease; /* instant snap on click */
}

/* Adjust text shadow on active to make debossing feel deeper during press */
body.light-theme .btn-creations:active .btn-text {
    color: rgba(71, 85, 105, 0.85);
    text-shadow: -1.5px -1.5px 0.5px rgba(0, 0, 0, 0.22), 1px 1px 0px rgba(255, 255, 255, 0.95);
}

body:not(.light-theme) .btn-creations:active .btn-text {
    color: rgba(156, 163, 175, 0.7);
    text-shadow: -1.5px -1.5px 1px rgba(0, 0, 0, 0.7), 1px 1px 0px rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   NAVIGATION HEADER
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 100;
    background-color: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    transition: background-color var(--transition-normal), border var(--transition-normal);
}

.header-container {
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 2.5px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 0.85; /* Extremely tight line spacing like the image */
}

.logo-line-1 {
    display: block;
}

.logo-line-2 {
    display: block;
    padding-left: 1.4em; /* Ajuste exato solicitado pelo usuário */
}

.logo-dot {
    color: var(--accent-purple); /* Mantendo a identidade neon atual */
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    box-shadow: var(--shadow-out-sm);
}

.nav-link.active {
    color: var(--text-primary);
    box-shadow: var(--shadow-in-sm);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* --- Theme Toggle Switch (Neumorphic Switch Design) --- */
.theme-switch-wrapper {
    position: relative;
    display: inline-block;
}

.theme-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.theme-switch-label {
    display: flex;
    align-items: center;
    width: 80px;
    height: 40px;
    background-color: var(--card-color);
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    box-shadow: var(--shadow-in-sm);
    border: 1px solid var(--glass-border);
    transition: background-color var(--transition-normal);
}

.theme-switch-handle {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-color);
    box-shadow: var(--shadow-out-sm);
    border: 1px solid var(--glass-border);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), background-color var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Light/Dark dynamic transitions for handle */
body.light-theme .theme-switch-handle {
    transform: translateX(0);
}

body.dark-theme .theme-switch-handle {
    transform: translateX(38px);
}

/* Hover state for tactile feel */
.theme-switch-label:hover .theme-switch-handle {
    box-shadow: var(--shadow-out);
}

/* Switch Icons inside the handle */
.theme-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.theme-icon svg {
    transition: stroke var(--transition-normal), filter var(--transition-normal);
}

/* Sun Icon states */
body.light-theme .sun-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

body.light-theme .sun-icon svg {
    color: #f59e0b; /* Bright gold in light mode */
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

body.dark-theme .sun-icon {
    opacity: 0;
    transform: scale(0) rotate(90deg);
}

/* Moon Icon states */
body.dark-theme .moon-icon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

body.dark-theme .moon-icon svg {
    color: #818cf8; /* Soft blue-purple in dark mode */
    filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.6));
}

body.light-theme .moon-icon {
    opacity: 0;
    transform: scale(0) rotate(-90deg);
}

/* --- Mobile Toggle Hamburger --- */
.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background-color: var(--card-color);
    box-shadow: var(--shadow-out-sm);
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-toggle:hover {
    box-shadow: var(--shadow-out);
}

.mobile-toggle:active {
    box-shadow: var(--shadow-in-sm);
}

.hamburger .line {
    transition: y 300ms ease-in 300ms, rotate 300ms ease-in, opacity 0ms ease-in 300ms;
    transform-origin: center;
}

.mobile-active .hamburger .line.top {
    y: 50px;
    rotate: 45deg;
}

.mobile-active .hamburger .line.middle {
    opacity: 0;
}

.mobile-active .hamburger .line.bottom {
    y: 50px;
    rotate: -45deg;
}

/* ==========================================================================
   GLOBAL SECTION HEADERS (SHARED BY ALL SECTIONS)
   ========================================================================== */
.section-header {
    margin-bottom: 4rem;
}

.sub-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-purple);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-desc {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* ==========================================================================
   COMMON COMPONENT STYLES: SHIELDED INPUTS (SHARED BY SHOWCASE & CONTACT)
   ========================================================================== */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-label {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.textarea-neu-wrapper, .input-neu-wrapper {
    position: relative;
    border-radius: 15px;
    background-color: var(--bg-color);
    box-shadow: var(--shadow-in);
    padding: 1.5px;
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
}

.textarea-neu-wrapper:focus-within, .input-neu-wrapper:focus-within {
    box-shadow: var(--shadow-in), 0 0 10px rgba(139, 92, 246, 0.15);
}

.input-neu {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    padding: 1rem 1.2rem;
    resize: none;
}

textarea.input-neu {
    height: 110px;
}

.select-wrapper::after {
    content: '▼';
    font-size: 0.75rem;
    color: var(--text-secondary);
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.select-neu {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.select-neu option {
    background-color: var(--bg-color);
    color: var(--text-primary);
    padding: 10px;
}

/* ==========================================================================
   FOOTER (GLOBAL)
   ========================================================================== */
.footer {
    padding: 4rem 0 2rem 0;
    margin-top: 80px;
    border-radius: 40px 40px 0 0 !important;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.footer-branding {
    text-align: center;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-motto {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    color: var(--text-primary);
    transform: translateY(-3px);
}

.social-icon:active {
    box-shadow: var(--shadow-in-sm);
    transform: translateY(0);
}

.footer-bottom {
    border-top: 1.5px solid var(--glass-border);
    width: 100%;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Desktop Default: Hide Bottom Nav --- */
.mobile-bottom-nav {
    display: none;
}

/* ==========================================================================
   RESPONSIVENESS (GLOBAL MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Global layout adaptations */
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container-width {
        padding: 0 1.5rem;
    }

    /* Enforce high contrast for debossed button on mobile */
    .btn-creations .btn-text {
        color: var(--accent-purple) !important;
        text-shadow: none !important;
    }
    body.light-theme .btn-creations .btn-text {
        color: var(--accent-indigo) !important;
        text-shadow: none !important;
    }

    /* Hide older mobile toggle and drawer menu */
    .mobile-toggle, .nav-menu {
        display: none !important;
    }

    /* Floating Neumorphic Bottom Navigation Bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        height: 68px;
        background-color: var(--glass-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 30px;
        box-shadow: var(--shadow-out);
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        padding: 0 10px;
        transition: transform var(--transition-normal), background-color var(--transition-normal), box-shadow var(--transition-normal);
    }

    .mobile-bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex-grow: 1;
        max-width: 90px; /* prevent item from pushing others out */
        height: 52px;
        border-radius: 22px;
        color: var(--text-secondary);
        font-family: var(--font-heading);
        font-weight: 600;
        font-size: 0.62rem;
        text-transform: uppercase;
        letter-spacing: 0px;
        gap: 3px;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        cursor: pointer;
    }

    .mobile-bottom-nav-item .nav-icon {
        stroke-width: 2.2;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.25s ease;
    }

    .mobile-bottom-nav-item .nav-label {
        font-size: 0.58rem;
        font-weight: 700;
        opacity: 0.8;
        transition: color 0.25s ease;
    }

    /* Tactile Debossed / Low-Relief Inset Active State on mobile tab bar */
    .mobile-bottom-nav-item.active {
        color: var(--text-primary);
        box-shadow: var(--shadow-in-sm);
        background-color: var(--card-color);
        border: 1px solid var(--glass-border);
    }

    .mobile-bottom-nav-item.active .nav-icon {
        transform: translateY(-2px) scale(1.08);
        stroke: var(--accent-purple);
    }
    
    body.light-theme .mobile-bottom-nav-item.active .nav-icon {
        stroke: var(--accent-indigo);
    }

    /* Add space at the bottom of the body so content doesn't get covered by the bottom nav */
    body {
        padding-bottom: 90px;
    }
}
