@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700;800&family=Mrs+Saint+Delafield&display=swap');

:root {
    /* Default Dark Theme */
    --bg-body: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-card: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-inset: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    --accent-primary: #b08d57; /* Golden Amber from Hero Light */
    --accent-secondary: #3e2723; /* Darker Espresso Walnut */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-theme: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    --font-signature: 'Mrs Saint Delafield', cursive;
    --hero-overlay: rgba(0, 0, 0, 0.3); /* Slightly lighter overlay to let wood tones pop */
    --hero-vignette: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    --hero-bg: url('Imags/hero_bg.png');
    --hero-bg-light: url('Imags/hero_bg_light.png');
    --hero-text: #ffffff;
    --blob-color-1: rgba(176, 141, 87, 0.12); /* Subtle Amber Glow */
    --blob-color-2: rgba(93, 64, 55, 0.1); /* Warm Walnut */
    --blob-color-3: rgba(75, 75, 75, 0.08); /* Felt Grey from Mousepad */
    --glass-blur: 20px;
    --nav-bg: rgba(10, 10, 12, 0.7);
}

[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.8);
    --border-card: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --glass-inset: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    --text-primary: #0f172a;
    --text-secondary: #5a6574;
    --hero-overlay: rgba(255, 255, 255, 0.1);
    --hero-vignette: radial-gradient(circle at center, transparent 0%, rgba(255, 255, 255, 0.3) 100%);
    --hero-text: #0f172a;
    --blob-color-1: rgba(30, 64, 175, 0.05);
    --blob-color-2: rgba(100, 116, 139, 0.05);
    --blob-color-3: rgba(51, 65, 85, 0.05);
    --glass-blur: 25px;
    --nav-bg: rgba(255, 255, 255, 0.45);
}

/* Premium Loader Styles */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--nav-bg); /* Semi-transparent base */
    backdrop-filter: blur(80px); /* Massive blur to show blobs mystically */
    -webkit-backdrop-filter: blur(80px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1), visibility 1.2s;
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.loader-wrapper.fade-out .loader-content {
    transform: translateY(-80px); /* Float up away as it fades */
}

.loader-logo {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.logo-path {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 400; /* Initial guess for path length */
    stroke-dashoffset: 400;
    animation: draw-logo 4s linear backwards;
    filter: drop-shadow(0 0 10px rgba(176, 141, 87, 0.4));
}

.loader-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: rotate-ring 2s linear infinite;
    mix-blend-mode: screen;
}

.loader-ring::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid rgba(176, 141, 87, 0.05);
    border-radius: 50%;
}

.loader-progress {
    width: 220px;
    height: 1px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.4s ease-out;
    box-shadow: 0 0 15px var(--accent-primary);
}

.loader-text {
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--accent-primary);
    letter-spacing: 5px;
    text-transform: uppercase;
    opacity: 0;
    animation: fade-in-text 1.5s ease-out 0.5s forwards, glow-text 3s ease-in-out infinite;
}

@keyframes draw-logo {
    0% { stroke-dashoffset: 400; }
    100% { stroke-dashoffset: 0; }
}

@keyframes rotate-ring {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fade-in-text {
    to { opacity: 0.6; }
}

@keyframes glow-text {
    0%, 100% { filter: drop-shadow(0 0 2px var(--accent-primary)); opacity: 0.4; }
    50% { filter: drop-shadow(0 0 8px var(--accent-primary)); opacity: 0.8; }
}

[data-theme="light"] .loader-wrapper {
    background: rgba(248, 250, 252, 0.7);
    backdrop-filter: blur(100px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    transition: var(--transition-theme);
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Hero Section Enhancement */
/* Hero Section Enhancement moved down for precedence */

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), var(--hero-bg-light);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    transition: var(--transition-theme);
    z-index: 1;
}

[data-theme="light"] #hero::before {
    opacity: 1;
}

.hero-content-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: var(--hero-vignette);
    position: relative;
    z-index: 2;
    transition: var(--transition-theme);
}

.hero-main-container .profile-img {
    width: 140px;
    height: 140px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.hero-main-container {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    animation: fadeIn 1.5s ease-out;
}

.hero-name-title {
    text-align: right;
}

.signature-name {
    font-family: var(--font-signature) !important;
    font-size: 6rem;
    color: var(--hero-text);
    margin-bottom: -10px;
    font-weight: 400;
    white-space: nowrap;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    transition: var(--transition-theme);
    position: relative;
    display: inline-block;
    /* Continuous Stroke Reveal */
    clip-path: inset(0 100% 0 0);
    animation: write-signature-continuous 3.5s cubic-bezier(0.445, 0.05, 0.55, 0.95) forwards;
    animation-delay: 0.8s;
}

.signature-name::after {
    content: '';
    position: absolute;
    top: 65%; /* Adjusted to script baseline */
    left: 0%;
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-primary);
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    animation: pen-tip-move 3.5s cubic-bezier(0.445, 0.05, 0.55, 0.95) forwards;
    animation-delay: 0.8s;
}

@keyframes write-signature-continuous {
    to { clip-path: inset(0 0 0 0); }
}

@keyframes pen-tip-move {
    0% { left: 0%; opacity: 0; }
    2% { left: 0%; opacity: 1; }
    98% { left: 100%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

[data-theme="light"] .signature-name {
    text-shadow: none;
}

.title-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--hero-text);
    text-transform: uppercase;
    margin-top: 5px;
    opacity: 0.9;
    white-space: nowrap;
}

.hero-separator {
    width: 2px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
}

.hero-contacts {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.hero-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--hero-text);
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-smooth), var(--transition-theme);
}

.hero-contact-item:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

.hero-contact-item i {
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@media (max-width: 768px) {
    .hero-main-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .hero-name-title {
        text-align: center;
    }

    .title-sub {
        white-space: normal;
        font-size: 0.95rem;
    }

    .signature-name {
        font-size: 4rem;
    }

    .hero-separator {
        width: 80px;
        height: 2px;
        margin: 10px auto;
    }

    .hero-main-container .profile-container {
        margin-right: 0 !important;
        margin-bottom: 15px;
    }

    .hero-contacts {
        text-align: center;
        align-items: center;
    }

    .cv-button {
        align-self: center !important;
    }

    .hero-content-wrapper {
        padding-top: 120px !important;
        /* Push content down to avoid overlap with fixed nav */
        align-items: flex-start;
        /* Start from top on mobile to ensure visibility */
    }
}

.cv-button {
    margin-top: 20px;
    align-self: flex-start;
    font-size: 0.85rem;
    padding: 10px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--hero-text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.cv-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    color: var(--accent-primary);
}

.cv-button i {
    font-size: 1rem;
    opacity: 0.8;
}

/* Theme Toggle styles */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    margin-left: 10px;
}

.theme-toggle-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: scale(1.1) rotate(15deg);
}

[data-theme="light"] .theme-toggle-btn .fa-sun {
    display: none;
}

html:not([data-theme="light"]) .theme-toggle-btn .fa-moon {
    display: none;
}

/* Language Switcher Styles */
.lang-switcher {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px;
    border-radius: 50px;
    border: 1px solid var(--border-card);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--accent-primary);
    color: white;
}

[data-theme="light"] .lang-switcher {
    background: rgba(0, 0, 0, 0.05);
}

section {
    padding: 100px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

#hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), var(--hero-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: hidden;
    left: 0;
    right: 0;
}

/* Main Navigation */
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}
.nav-links a:visited, .nav-links a:active { color: var(--text-secondary); }
.nav-links a:hover { color: var(--accent-primary); }

[data-theme="light"] .nav-links a { color: #1e293b !important; }
[data-theme="light"] .nav-links a:visited, [data-theme="light"] .nav-links a:active { color: #1e293b !important; }
[data-theme="light"] .nav-links a:hover, [data-theme="light"] .nav-links a.active { color: var(--accent-primary) !important; }

.main-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1000px;
    z-index: 1000;
    padding: 10px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100px;
    background: var(--nav-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-card);
    transition: var(--transition-smooth);
}

[data-theme="light"] .main-nav {
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    z-index: 2000;
    transition: width 0.1s ease-out;
}

/* Active Nav Link */
.nav-links a.active {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--glass-shadow), var(--glass-inset);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.glass-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45), var(--glass-inset);
}

/* Radar Chart Container */
.radar-container {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    transition: all 0.4s ease;
}

/* CV Button Feedback */
.cv-button.downloading {
    background: var(--accent-secondary) !important;
    pointer-events: none;
    transform: scale(0.95);
}

.cv-button.success {
    background: #22c55e !important;
    border-color: #22c55e !important;
}

.heading-gradient {
    background: linear-gradient(135deg, var(--accent-primary), #8d6e63);
    /* Amber to Warm Brown gradient */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .heading-gradient {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    padding: 12px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
    border: 1px solid var(--border-card);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Social Icons Styling */
.social-icon-nav {
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-icon-nav:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.social-icon-large {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.4rem;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.social-icon-large:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -5px rgba(78, 78, 78, 0.3);
}

.social-link-footer {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.social-link-footer:hover {
    color: var(--accent-primary);
    transform: scale(1.2);
}

/* Contact Links Styling */
.contact-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: var(--transition-smooth);
    padding: 10px;
    border-radius: 10px;
}

.contact-link i {
    color: var(--accent-primary);
    font-size: 1.3rem;
    transition: var(--transition-smooth);
}

.contact-link:hover {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.contact-link:hover i {
    transform: scale(1.2);
}

/* Animations classes */
.reveal {
    opacity: 1; /* Force visibility by default */
    transform: none;
    transition: var(--transition-smooth);
}

.reveal.active {
    opacity: 1;
    transform: none;
}

@media (max-width: 768px) {
    section {
        padding: 60px 20px;
    }

    #hero h1 {
        font-size: 2.5rem !important;
    }

    #hero p {
        font-size: 1.1rem !important;
    }

    #hero .btn-primary,
    #hero .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    nav {
        padding: 10px 20px !important;
        width: 95% !important;
    }

    .nav-links {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
        /* space for scrollbar if it appears */
        max-width: 100%;
        scrollbar-width: none;
        /* hide scrollbar on Firefox */
    }

    .nav-links::-webkit-scrollbar {
        display: none;
        /* hide scrollbar on Chrome/Safari */
    }

    .nav-links a {
        display: block;
        font-size: 0.75rem !important;
        white-space: nowrap;
    }

    .nav-links a[href="#formacao"],
    .nav-links a[href="#certificacoes"],
    .nav-links a[href="#depoimentos"] {
        display: none;
        /* Hide less critical links to avoid excessive scrolling on mobile */
    }

    .nav-links span {
        display: none;
    }

    nav .social-shortcuts {
        gap: 15px;
    }
}

a {
    transition: var(--transition-smooth);
    text-decoration: none;
}

strong {
    color: #cbd5e1;
    /* Lighter gray for strong tags in dark mode */
}

[data-theme="light"] strong {
    color: var(--accent-primary);
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border-card);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
    transition: var(--transition-smooth);
}

.profile-img:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 0 50px rgba(112, 112, 112, 0.5);
}

/* Animated Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.05;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    transition: var(--transition-theme);
    animation: move-blob 25s infinite alternate ease-in-out;
}

.blob-1 {
    background: var(--blob-color-1);
    top: -150px;
    left: -150px;
}

.blob-2 {
    background: var(--blob-color-2);
    top: 30%;
    right: -200px;
    animation-delay: -5s;
    animation-duration: 35s;
}

.blob-3 {
    background: var(--blob-color-3);
    bottom: -200px;
    left: 20%;
    animation-delay: -12s;
    animation-duration: 40s;
}

@keyframes move-blob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, 150px) scale(1.1);
    }

    66% {
        transform: translate(-80px, 100px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@media (max-width: 768px) {
    .profile-img {
        width: 150px;
        height: 150px;
    }
}

/* Back to Top Button Styling */
.back-to-top {
    position: fixed;
    bottom: 95px; /* Inverted: Now on top */
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-card);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-theme), transform 0.3s ease, opacity 0.4s ease, visibility 0.4s ease;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 15px 40px -10px rgba(37, 99, 235, 0.3);
}

.back-to-top i {
    transition: transform 0.3s ease;
}

.back-to-top:hover i {
    transform: translateY(-2px);
}

/* Project Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: var(--accent-primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
}

/* Project Thumbnail Styles */
.project-img-container {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--border-card);
}

.project-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.glass-card:hover .project-thumbnail {
    transform: scale(1.1);
}

/* Project Filters Styling */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(176, 141, 87, 0.3);
}

/* Project Card Filter Animation */
.project-card {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.project-card.hidden {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.projects-grid {
    transition: all 0.6s ease;
}

/* Skill Icons */
.skill-icon-top {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 20px;
    display: block;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 500;
}

.skill-item i {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
    transition: var(--transition-smooth);
}

.skill-item:hover i {
    transform: scale(1.3) rotate(5deg);
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

.skill-item i.colored {
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.1));
}

/* Certification Cards */
.cert-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cert-icon {
    font-size: 1.8rem;
    color: var(--accent-primary);
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.cert-card:hover .cert-icon {
    transform: scale(1.2) rotate(-10deg);
    opacity: 1;
    filter: drop-shadow(0 0 10px var(--accent-primary));
}

/* Enhancing Hover Effects */
.glass-card i.fas,
.glass-card i.fab {
    transition: var(--transition-smooth);
}

.glass-card:hover i.fas,
.glass-card:hover i.fab {
    transform: scale(1.1);
    color: var(--accent-secondary);
}

/* Copy Email Feedback */
.copy-feedback {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-primary);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 2000;
    transition: transform 0.5s ease;
}

.copy-feedback.show {
    transform: translateX(-50%) translateY(0);
}

/* Project Detail Buttons */
.btn-detail {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-detail:hover {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--bg-body);
    width: 90%;
    max-width: 550px;
    max-height: 90vh; /* Allow a bit more height if possible */
    padding: 0; 
    position: relative;
    border: 1px solid var(--border-card);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden; /* Important to keep banner edges clean and no horizontal scroll */
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-body-content {
    padding: 25px 30px 40px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--border-card) transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-card);
    border-radius: 10px;
    border: 3px solid var(--bg-body);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Modal Close Button */
.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 3100;
    backdrop-filter: blur(5px);
}

.close-modal:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
}

/* Modal Banner Styles */
.modal-header-img {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.modal-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Inner Modal Headings */
.modal-body-content h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.8rem;
}

.modal-body-content h4 {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-primary);
    font-weight: 700;
}

.modal-body-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
    .modal-header-img {
        height: 160px;
    }
    .modal-body-content {
        padding: 20px 20px 30px;
    }
    .modal-body-content h2 {
        font-size: 1.5rem;
    }
}

/* Testimonial Section */
.testimonial-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-card);
}

.testimonial-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.testimonial-info h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

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

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Custom Elite Cursor (Single Dot Reveal) */
html, body {
    cursor: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .custom-cursor {
        width: 8px;
        height: 8px;
        background-color: var(--accent-primary);
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        z-index: 10000;
        transform: translate(-50%, -50%);
        box-shadow: 0 0 15px var(--accent-primary);
        transition: width 0.35s cubic-bezier(0.23, 1, 0.32, 1), 
                    height 0.35s cubic-bezier(0.23, 1, 0.32, 1), 
                    background-color 0.35s, 
                    border 0.35s,
                    opacity 0.3s;
    }

    .custom-cursor.active {
        width: 45px;
        height: 45px;
        background-color: rgba(176, 141, 87, 0.08); /* Sophisticated transparency */
        border: 1px solid var(--accent-primary);
        box-shadow: 0 0 20px rgba(176, 141, 87, 0.2);
    }

    /* Keep system cursor hidden for all interaction */
    a, button, .btn, .social-icon-nav, .social-icon-large, .nav-links a, .contact-link {
        cursor: none !important;
    }
}

/* Magnetic Button Base Transitions */
.btn-primary, .btn-secondary, .cv-button, .social-icon-large, .nav-links a, .contact-link {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), background 0.3s, color 0.3s, box-shadow 0.3s;
}
/* --- Bento Grid Layout (Premium 2.0) --- */
.bento-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 20px;
    margin-top: 40px;
}

.bento-wide {
    grid-column: span 2;
}

.bento-tall {
    grid-row: span 2;
}

.bento-small {
    grid-column: span 1;
    grid-row: span 1;
}

@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bento-grid {
        display: flex !important;
        flex-direction: column;
    }
    .bento-wide, .bento-tall, .bento-small {
        grid-column: span 1;
        grid-row: span 1;
    }
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-content-bento {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

/* GitHub Stats Card Styling */
.github-stats-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}
[data-theme="light"] .github-stats-card {
    background: linear-gradient(135deg, #f1f5f9, #f8fafc);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .stats-label, [data-theme="light"] .stat-name { color: #64748b; }
[data-theme="light"] .stat-value { color: #1e293b; }


.stats-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stats-icon {
    font-size: 1.5rem;
    color: var(--accent-primary);
}

.stats-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.stats-grid {
    display: flex;
    gap: 25px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
}

.stat-name {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.stats-activity {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.65rem;
    color: var(--accent-primary);
    font-weight: 600;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse-github 2s infinite;
}

@keyframes pulse-github {
    0% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(176, 141, 87, 0.7); }
    70% { transform: scale(1.2); opacity: 0.8; box-shadow: 0 0 0 10px rgba(176, 141, 87, 0); }
    100% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 0 rgba(176, 141, 87, 0); }
}

/* Hidden state for filter */
.project-card.hidden {
    display: none !important;
}

/* --- AI Assistant (Bruno-bot) Styles --- */
.ai-assistant-wrapper {
    position: fixed;
    bottom: 30px; /* Inverted: Now at the bottom */
    right: 30px;
    z-index: 5000;
}

.ai-chat-btn {
    width: 50px;
    height: 50px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px -5px rgba(176, 141, 87, 0.4);
    color: white;
    font-size: 1.2rem;
    position: relative;
    transition: var(--transition-smooth);
}

.ai-chat-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

.ai-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--text-primary);
    color: var(--bg-body);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 10px;
}

.ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px; /* More compact width */
    height: 420px; /* More compact height */
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 5001;
    overflow: hidden;
    padding: 0 !important;
    background: rgba(10, 10, 15, 0.95) !important; /* Premium deep dark */
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .ai-chat-window {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.ai-chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ai-chat-header {
    padding: 12px 15px; /* More compact */
    background: rgba(255, 255, 255, 0.03); 
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-card);
}

[data-theme="light"] .ai-chat-header {
    background: rgba(0, 0, 0, 0.02);
}

.ai-status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
}

.ai-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.ai-chat-messages {
    flex-grow: 1;
    padding: 15px; /* More compact */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Pop-up shadow */
}

.ai-msg {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08); 
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .ai-msg {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.05);
}

.user-msg {
    align-self: flex-end;
    background: var(--accent-primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.ai-chat-input {
    padding: 12px; /* More compact */
    background: rgba(0, 0, 0, 0.1); 
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--border-card);
}

[data-theme="light"] .ai-chat-input {
    background: rgba(255, 255, 255, 0.05);
}

.ai-chat-input input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}

.ai-chat-input button {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.ai-chat-input button:hover {
    opacity: 0.8;
}

/* QR Code Container Styling */
.qrcode-container {
    transition: var(--transition-smooth);
}

.qrcode-container:hover {
    transform: scale(1.05);
}

/* --- Terminal / Command Palette Styles --- */
.command-palette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.command-palette.active {
    display: flex;
    opacity: 1;
}

.terminal-card {
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid var(--border-card);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.command-palette.active .terminal-card {
    transform: translateY(0) scale(1);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    gap: 15px;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.terminal-input-wrapper {
    padding: 20px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.terminal-prompt {
    color: var(--accent-primary);
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
}

#terminal-input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    width: 100%;
    outline: none;
}

.terminal-hints {
    padding: 0 20px 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hint-tag {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.hint-tag:hover {
    background: var(--accent-primary);
    color: white;
}

/* Voice Integration UI */
.voice-controls {
    display: flex;
    gap: 10px;
    padding: 10px 15px;
    border-top: 1px solid var(--border-card);
    background: rgba(255, 255, 255, 0.02);
}

.voice-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.voice-btn:hover {
    color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
}

.voice-btn.active {
    color: #ef4444;
    animation: pulse-voice 1.5s infinite;
}

@keyframes pulse-voice {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

[data-theme="light"] .terminal-card {
    background: white;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
}
