:root {
    --primary-color: #ffffff;
    --secondary-color: #f1f1f1;
    --accent-color: #4e95d9;
    --header-color: #2c3e50;
    --dark-color: #212121;
    --text-color: #2c3e50;
    --button-color: #444444;
    --axspa-theme-color: #137400;
    --general-theme-color: var(--accent-color);
    --font-family: 'Manrope', sans-serif;
    --transition-speed: 0.3s;
    letter-spacing: -0.5px;
    -webkit-font-smoothing: antialiased;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 3rem 20px;
}

h1,
h2,
h3 {
    color: var(--header-color);
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 400;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.5rem;
}

.subsection {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2em;
}

.underline {
    width: 80px;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color var(--transition-speed) ease;
}

section {
    opacity: 0;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    z-index: 1000;
    padding: 1rem 0;
    height: 100px;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
}

.logo {
    width: 100px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    background-color: var(--primary-color);
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: var(--header-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-speed) ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    vertical-align: middle;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--header-color);
    transition: all var(--transition-speed) ease-in-out;
}

#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    padding-top: 100px;
    box-sizing: border-box;
    height: auto;
    min-height: calc(60vh - 100px);
    position: relative;
    overflow: hidden;
}

.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    bottom: 100px;
    height: 100%;
    background-size: cover;
    background-position: center center;
    max-height: 100%;
    ;
    z-index: -2;
}

.filter {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    bottom: 50px;
    background-color: rgba(65, 65, 65, 0.74);
    pointer-events: none;
    max-height: 100%;
    ;
    z-index: -1;
}

#hero .container {
    display: flex;
    max-width: 50%;
    width: 100%;
    min-height: calc(60vh - 100px - 100px);
    padding: 0 20px;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 1;
}

#hero h1 {
    font-size: 3rem;
    margin-bottom: 0;
    color: var(--primary-color);
    line-height: 1.4;
    text-align: center;
}

#hero .subtitle {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 500;
    line-height: 1.4;
    width: 100%;
    text-align: left;
}

#hero .mainTitle {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

#hero .profilePhoto {
    display: flex;
    justify-content: center;
    height: 30%;
    width: 30%;
    max-width: 250px;
    margin-top: 20px;
    margin-bottom: 20px;
    object-fit: cover;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--header-color);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.cta-button:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    color: var(--header-color);
}

.subheader {
    flex: 2;
}

.subheader h2 {
    display: flex;
    align-items: center;
    justify-content: center;
}

.skills-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1.5rem;
}

.skills-list li {
    background-color: var(--secondary-color);
    color: var(--header-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

#grid-section {
    padding-top: 20px;
    place-self: center;
}

#projects {
    background-color: var(--primary-color);
    padding-top: 0px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.project-image {
    height: 400px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.project-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.project-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    color: var(--accent-color);
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 500;
}

.project-info p {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.project-links a {
    margin-right: 15px;
    font-weight: bold;
    align-self: flex-end;
}

#contact .container {
    max-width: 700px;
    text-align: center;
}

.contact-form {
    margin-top: 2rem;
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--header-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color);
    border: 2px solid transparent;
    border-radius: 5px;
    color: var(--header-color);
    font-size: 1rem;
    transition: border-color var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: var(--header-color);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

.submit-btn:hover {
    background-color: #2980b9;
}

.main-footer {
    background-color: var(--primary-color);
    text-align: center;
    padding: 2rem 0;
    color: var(--text-color);
}

.social-links {
    margin-top: 10px;
}

.social-links a {
    margin: 0 10px;
    font-size: 1.2rem;
    color: var(--header-color);
    text-decoration-line: underline;
    text-underline-offset: 6px;
}

#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 28px;
    line-height: 0.1em;
    text-align: center;
    cursor: pointer;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease, background-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#scrollTopBtn.visible {
    display: block;
    opacity: 1;
}

#scrollTopBtn:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    #hero h1 {
        font-size: 2.5rem;
    }

    #hero .subtitle {
        font-size: 1.4rem;
    }

}

@media (max-width: 768px) {
    #hero .container {
        flex-direction: column;
        text-align: center;
        max-width: 80%;
        padding: 20px;
        height: auto;
        gap: 0px;
    }

    #hero .mainTitle {
        width: 100%;
    }

    #hero h1 {
        font-size: 2rem;
        text-align: center;
    }

    #hero .subtitle {
        font-size: 1.1rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    #hero .profilePhoto {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }

    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
    }

    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
    }

    .main-nav {
        width: 100%;
        margin-top: 0;
        display: none;
        position: absolute;
        top: 100px;
        left: 0;
        background-color: var(--primary-color);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        border-radius: 0 0 10px 10px;
        padding: 10px 0;
        z-index: 999;
        transform: translateY(-100%);
        transition: transform 0.3s ease-out;
    }

    .main-nav.active {
        display: block;
        transform: translateY(0%);
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    .main-nav ul li {
        margin: 0;
        padding: 10px 0;
        text-align: center;
        border-bottom: 1px solid var(--secondary-color);
    }

    .main-nav ul li:last-child {
        border-bottom: none;
    }

    .main-nav ul li a {
        display: block;
        padding: 10px 20px;
        color: var(--header-color);
        font-size: 1.1rem;
    }

    .main-nav ul li a::after {
        content: none;
    }

    .main-nav ul li a.active {
        color: var(--accent-color);
        font-weight: bold;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 33px;
        right: 40px;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}
