@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

* {
    box-sizing: border-box;
    font-family: 'Open Sans', Helvetica, Arial, sans-serif;
    color: #333447;
    line-height: 1.5;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    left: 0;
    top: 0;
    font-size: 100%;
    background-color: #F1F1F1;
    position: relative;
    z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.375rem;
}

h4 {
    font-size: 1.125rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

p {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.8;
}

.font-light {
    font-weight: 300;
}

.font-regular {
    font-weight: 400;
}

.font-heavy {
    font-weight: 700;
}

a {
    color: #0366d6;
    text-decoration: none;
    transition: color 0.3s ease-out, text-decoration 0.3s ease-out;
}

a:visited {
    color: #0366d6;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.left {
    text-align: left;
}

.right {
    text-align: right;
}

.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.justify {
    text-align: justify;
}

#first-row {
    margin-top: 25px;
}

#first-row h1{
    margin-top: 1px;
    margin-bottom: 1px;
}

#first-row h3{
    margin-top: 1px;
    color: #959da5;
}

#cv-link{
    font-size: large;
}

#last-row {
    margin-bottom: 50px;
}

#social-links {
    font-size: x-large;
    margin-top: 20px;
}

#social-links img {
    margin-right: 10px;
    height: 1em;
    width: 1em;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

#social-links a:hover img {
    text-decoration: none;
    transform: scale(1.1);
    opacity: 0.8;
}

.emoji {
    height: 1em;
    margin-right: 5px;
}

.avatar {
    width: 50%;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 25px;
    display: block;
    border-radius: 10%;
}

.mobile-only {
    display: none; 
}

.desktop-only {
    display: flex; 
}

.theme-toggle-mobile {
    display: none; 
}


@media (max-width: 768px) {

    .theme-toggle-mobile {
        position: fixed;
        top: 3px;
        left: 12px;
        width: 40px;
        height: 40px;
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        z-index: 1001;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .theme-toggle-mobile:hover {
        transform: scale(1.1);
        background-color: #f0f0f0;
    }

    .dark-mode .theme-toggle-mobile {
        background-color: rgba(30, 30, 30, 0.9);
        color: #eee;
    }

    .dark-mode .theme-toggle-mobile:hover {
        background-color: #444;
    }
    
    .nav-container {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        padding: 0 15px;
    }

    .nav-toggle {
        display: flex;
        align-items: center;
        cursor: pointer;
        gap: 8px;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .menu-text.mobile-only {
        font-family: 'Open Sans', sans-serif;
        font-weight: 600;
        font-size: 0.95rem;
        color: #0366d6;
        white-space: nowrap;
        display: inline;
    }

    .hamburger-lines {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .bar {
        width: 28px;
        height: 3px;
        background-color: #0366d6;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .nav-toggle .bar {
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: auto;
        right: -100%;
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.12),
            0 15px 35px rgba(0, 0, 0, 0.08),
            0 5px 15px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 90px;
        gap: 12px;
        transform: translateX(100%);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        right: 0;
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        z-index: 999;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-menu.active + .nav-overlay {
        opacity: 1;
        visibility: visible;
    }

    .dark-mode .nav-menu {
        background-color: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 15px 35px rgba(0, 0, 0, 0.2),
            0 5px 15px rgba(0, 0, 0, 0.1);
    }
    
    .dark-mode .menu-text {
        color: #64b5f6;
    }
    
    .dark-mode .bar {
        background-color: #64b5f6;
    }

    .close-menu.mobile-only {
        position: fixed;
        top: 5px;
        right: 26px;
        width: 40px;
        height: 40px;
        background-color: rgba(255, 255, 255, 0.9);
        color: #333;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        font-weight: bold;
        z-index: 1001;
        cursor: pointer;
        opacity: 0;
        pointer-events: none;
        transform: scale(0.8);
        transition: 
            opacity 0.3s ease,
            transform 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .close-menu.mobile-only:hover {
        transform: scale(1.15) rotate(90deg);
        background-color: #0366d6;
        color: white;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        border: 2px solid #0366d6;
    }

    .nav-menu.active ~ .close-menu.mobile-only {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1);
    }

    .dark-mode .close-menu {
        background-color: rgba(30, 30, 30, 0.9);
        color: #eee;
    }


    .row {
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .col-12, .col-md-6, .col-md-9, .col-md-3 {
        padding-left: 12px;
        padding-right: 12px;
    }

    #first-row {
        margin-top: 15px;
    }

    #last-row {
        margin-bottom: 30px;
    }

    h2 {
        margin-top: 10px;
        margin-bottom: 8px;
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.2rem;
        margin-top: 8px;
    }

    ul {
        padding-left: 20px;
        margin-bottom: 16px;
    }

    li {
        margin-bottom: 8px;
    }

    .container {
        margin-top: 70px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .button-cta, .button-cta-secondary {
        padding: 10px 18px;
        font-size: 1rem;
    }

    #first-row p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .justify,
    p {
        padding-left: 20px;
        padding-right: 20px;
    }

    .theme-toggle-mobile {
        display: flex !important;
    }

    .nav-menu.active #theme-toggle-desktop {
        display: none !important;
    }

    .desktop-only {
        display: none;
    }
}


@media (max-width: 480px) {
    
    .nav-container {
        padding: 0 12px;
    }

    .nav-toggle {
        gap: 6px;
    }

    .menu-text {
        font-size: 0.9rem;
    }

    .hamburger-lines {
        gap: 3px;
    }

    .bar {
        width: 26px;
        height: 3px;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.94);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.12),
            0 15px 35px rgba(0, 0, 0, 0.08),
            0 5px 15px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding-top: 75px;
        gap: 10px;
        transform: translateX(100%);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        right: 0;
    }

    .nav-menu li {
        padding: 9px 14px;
    }

    .nav-menu a {
        font-size: 0.9rem;
        font-weight: 600;
    }

    .nav-overlay {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        z-index: 999;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-menu.active + .nav-overlay {
        opacity: 1;
        visibility: visible;
    }

    
    .dark-mode .nav-menu {
        background-color: rgba(30, 30, 30, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 15px 35px rgba(0, 0, 0, 0.2),
            0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .dark-mode .menu-text {
        color: #64b5f6;
    }

    .dark-mode .bar {
        background-color: #64b5f6;
    }

    
    #theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    p, .justify, .center {
        font-size: 1rem;
        line-height: 1.7;
    }

    #first-row {
        margin-top: 15px;
    }

    .button-cta, .button-cta-secondary {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

html {
    scroll-behavior: smooth;
}


.theme-toggle-fixed {
    position: fixed;
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1001;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.theme-toggle-fixed:hover {
    transform: scale(1.1);
    background-color: #f0f0f0;
}

.dark-mode .theme-toggle-fixed {
    background-color: rgba(30, 30, 30, 0.9);
    color: #eee;
}

.dark-mode .theme-toggle-fixed:hover {
    background-color: #444;
}


#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: transparent;
    background-image: url('');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
    z-index: -1;
    top: 0;
    left: 0;
}

.button-cta, .button-cta-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease-in-out;
    margin-top: 20px;
}

.button-cta {
    background-color: #0366d6;
    color: #ffffff;
    border: 2px solid #0366d6;
}

a.button-cta:hover {
    background-color: transparent;
    color: #0366d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.button-cta-secondary {
    background-color: transparent;
    color: #0366d6;
    border: 2px solid #0366d6;
}

a.button-cta-secondary:hover {
    background-color: #0366d6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}


.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(0px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 26px;
}

.navbar a {
    color: #0366d6;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 4px 0;
    position: relative;
    transition: color 0.3s ease, transform 0.2s ease;
    transform: translateY(0);
}

.navbar a::before {
    content: '';
    position: absolute;
    left: 50%;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: #afa258; 
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

.navbar a:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.navbar a:hover {
    color: #004aad; 
    transform: translateY(-3px);
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    padding: 12px 20px;
}

h2[id] {
    scroll-margin-top: 70px;
}

.container {
    margin-top: 92px;
}


body.dark-mode {
    background-color: #1F1010;
    color: #e0e0e0;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6 {
    color: #ffffff !important;
}


.dark-mode a {
    color: #64b5f6 !important;
}

.dark-mode a:hover {
    color: #90caf9 !important;
    text-decoration: none;
}

.dark-mode .button-cta {
    background-color: #1976d2;
    border: 2px solid #1976d2;
    color: white;
}

.dark-mode .button-cta:hover {
    background-color: transparent;
    color: #1976d2;
}

.dark-mode .button-cta-secondary {
    background-color: transparent;
    color: #64b5f6;
    border: 2px solid #64b5f6;
}

.dark-mode .button-cta-secondary:hover {
    background-color: #1976d2;
    color: white;
}

.dark-mode .navbar {
    background-color: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dark-mode .navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(2px); 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 6px 14px;
}

.dark-mode .container {
    background-color: rgba(20, 20, 20, 0.7);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.dark-mode #particles-js {
    background-color: #0a0a0a;
}

#theme-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.4s ease, background-color 0.4s ease, color 0.4s ease;
}



#theme-toggle.click-animation,
.theme-toggle-mobile.click-animation,
#theme-toggle-desktop.click-animation {
    transform: rotate(45deg) scale(1.1);
}

#theme-toggle-desktop{
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

#theme-toggle:hover {
    transform: scale(1.1);
    background-color: #f0f0f0;
}

.dark-mode #theme-toggle:hover {
    background-color: #333;
}

.dark-mode p,
.dark-mode ul,
.dark-mode li,
.dark-mode i,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6 {
    color: #dfdfdf !important;
}

.dark-mode ul ul,
.dark-mode ol {
    color: #aaaaaa;
}

.dark-mode b,
.dark-mode strong {
    color: #ffffff !important;
}
