/* Root Variables */
:root {
    --background-color: #121212;
    --primary-color: #1f8ef1;
    --secondary-color: #1c1c1c;
    --text-color: #f5f5f5;
    --accent-color: #bf55b9;
    --gradient: linear-gradient(135deg, #1f8ef1, #871f7b);
}

@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    section {
        scroll-margin-top: 50px !important;
    }
}

/* General Styles */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    scroll-behavior: smooth;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
    background: var(--secondary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

nav .menu {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger.active div:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.burger.active div:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    .burger {
        display: flex;
    }

    nav .menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--secondary-color);
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    }

    nav .menu.active {
        display: flex;
        flex-direction: column;
    }

    nav a {
        margin: 0;
    }
}

/* Hero Section */
header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--gradient);
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

header h1 {
    font-size: 3rem;
    animation: fadeIn 1s ease-in-out;
}

header .title {
    font-size: 1.5rem;
    margin: 0.25rem 0;
    animation: fadeIn 1s ease-in-out;
}

header .skills {
    font-size: 1rem;
    margin: 0.25rem 0;
    animation: fadeIn 1s ease-in-out;
}

header img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
    animation: fadeInOnce 1s ease-in-out;
}

header a {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s ease;
}

header a:hover {
    background: var(--accent-color);
}

header::before, header::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s infinite ease-in-out;
}

header::before {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -50px;
}

header::after {
    width: 400px;
    height: 400px;
    bottom: 10%;
    right: -100px;
}

/* Sections */
section {
    height: 100vh;
    width: 100%;
    padding: 3rem 1rem;
    margin: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient);
    color: var(--text-color);
    animation: fadeIn 1.5s ease-in-out;
    scroll-margin-top: 70px; /* Offset for fixed navbar */
}

section:nth-child(odd) {
    background: var(--secondary-color);
}

section h2 {
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-size: 2rem;
    animation: fadeIn 1.5s ease-in-out;
}

section p, section ul {
    line-height: 1.6;
    font-size: 1.1rem;
    animation: fadeIn 2s ease-in-out;
}

section::before, section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 8s infinite ease-in-out;
}

section::before {
    width: 200px;
    height: 200px;
    top: -50px;
    left: -50px;
}

section::after {
    width: 300px;
    height: 300px;
    bottom: -100px;
    right: -100px;
}

.send-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.send-button:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.contact-details {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-details i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

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

.contact-details a:hover {
    color: var(--accent-color);
}

/* Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInOnce {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

#scrollToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: none; /* Initially hidden */
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    z-index: 1000;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#scrollToTop:hover {
    background: var(--accent-color);
}

#scrollToTop.show {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

#scrollToTop.hide {
    opacity: 0;
    transform: scale(0.8);
}