:root {
    --primary-color: #4a90e2;
    --secondary-color: #0a0a2a;
    --text-color: #ffffff;
    --accent-color: #f0f0f0;
    --contact-bg-color: #000000;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    scroll-behavior: smooth;
    line-height: 1.6;
}

header {
    background-color: rgba(15, 15, 61, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: 40px;
    margin-right: 1rem;
}

.nav-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.nav-right ul {
    list-style-type: none;
    display: flex;
    gap: 1rem;
    padding: 0;
}

.nav-right a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.nav-right a:hover, .nav-right a.active {
    background-color: rgba(74, 144, 226, 0.2);
    color: var(--primary-color);
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 20px;
}

.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 1;
}

.hero-image {
    flex: 1;
    max-width: 500px;
    height: 400px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

#animated-image {
    width: 120%;
    height: 120%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.brief-description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icons a {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.social-icons a::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.social-icons a:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.highlight-box {
    background-color: rgba(138, 43, 226, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.highlight-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.highlight-content {
    font-size: 1.1rem;
    line-height: 1.6;
}

#animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.content-section {
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    background-color: rgba(10, 10, 26, 0.8);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.skills-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 0 2rem;
}

.skills-boxes {
    width: 60%;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-box {
    width: calc(50% - 0.5rem);
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.2);
}

.skill-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 10, 26, 0.7);
    transition: transform 0.3s ease;
}

.skill-box:hover::before {
    transform: scale(1.1);
}

.skill-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: #ffffff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 1;
}

.skill-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.skill-content p {
    font-size: 0.9rem;
}

.skills-icons {
    width: 40%;
}

.skills-icons h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.icon-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.skill-icon-wrapper {
    position: relative;
    display: inline-block;
}

.skill-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.skill-icon-wrapper:hover .skill-icon {
    transform: scale(1.1);
}

.skill-icon-wrapper::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.skill-icon-wrapper:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

@media (max-width: 768px) {
    .skills-container {
        flex-direction: column;
    }

    .skills-boxes, .skills-icons {
        width: 100%;
    }

    .skill-box {
        width: 100%;
    }
}
.experience-item, .project-item {
    background-color: rgba(138, 43, 226, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.experience-title, .project-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-item {
    display: flex;
    background-color: rgba(74, 144, 226, 0.1);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.2);
}

.project-info {
    flex: 1;
    padding: 2rem;
}

.project-image {
    flex: 1;
    max-width: 50%;
}

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

.project-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.project-link:hover {
    background-color: #3a80d2;
}

footer {
    background-color: #0f0f3d;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.scroll-top-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 1000;
}

.scroll-top-button.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top-button:hover {
    background-color: #3a80d2;
}

#contact {
    background-color: var(--contact-bg-color);
    color: #ffffff;
    padding: 4rem 0;
    border-radius: 10px;
    margin-top: 2rem;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-info, .contact-form {
    width: 48%;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.download-cv {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 2rem;
    transition: background-color 0.3s ease;
}

.download-cv:hover {
    background-color: #3a80d2;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    background-color: #1a1a1a;
    color: #ffffff;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.contact-form button {
    align-self: flex-start;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #3a80d2;
}

.experience-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.experience-info {
    flex: 1;
    padding-right: 20px;
}

.experience-image {
    flex: 0 0 40%;
    max-width: 40%;
}

.coding-gif {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-content, .hero-image {
        max-width: 100%;
    }

    .hero-image {
        height: 300px;
        margin-top: 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .brief-description {
        font-size: 0.9rem;
    }

    .skills-container {
        flex-direction: column;
    }

    .skills-boxes, .skills-icons {
        width: 100%;
    }

    .project-item {
        flex-direction: column;
    }
    
    .project-image {
        max-width: 100%;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-info, .contact-form {
        width: 100%;
    }

    .contact-info {
        margin-bottom: 2rem;
    }

    .experience-container {
        flex-direction: column;
    }

    .experience-image {
        flex: 1;
        max-width: 100%;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .nav-right ul {
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: rgba(15, 15, 61, 0.95);
        padding: 1rem;
        border-radius: 0 0 0 10px;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .nav-right ul.show {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-right ul li {
        margin: 0.5rem 0;
    }

    .hamburger {
        display: block;
        cursor: pointer;
    }

    .hamburger div {
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    .hamburger.active div:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active div:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active div:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Improved accessibility */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --secondary-color: #0a0a2a;
        --text-color: #ffffff;
        --contact-bg-color: #000000;
    }
}

/* Print styles */
@media print {
    header, footer, .social-icons, .project-link, .download-cv, .contact-form {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }

    .content-section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: none;
        color: #000;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Smooth scrolling for internal links */
html {
    scroll-behavior: smooth;
}

/* Improved form styles */
.contact-form input:focus,
.contact-form textarea:focus {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.5);
}

/* Add loading indicator for asynchronous content */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Improved button styles */
button, .project-link, .download-cv {
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover, .project-link:hover, .download-cv:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Add a subtle text selection style */
::selection {
    background-color: rgba(74, 144, 226, 0.3);
    color: var(--text-color);
}