:root {
    --primary: #00ff88;
    --secondary: #0088ff;
    --dark: #0a0a0a;
    --darker: #050505;
    --gray: #333;
    --light-gray: #666;
    --text: #ffffff;
    --text-dim: #aaaaaa;
    --accent: rgba(0, 255, 136, 0.1);
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--darker);
    color: var(--text);
    overflow-x: hidden;
}

/* Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.gif-background {
    width: 100%;
    height: 100%;
    background: url('https://media1.tenor.com/m/RLci7CFL-fIAAAAd/sofia-isella.gif') center/cover;
    filter: blur(8px) brightness(0.3);
    animation: pulse 8s ease-in-out infinite alternate;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.terminal {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--primary);
    border-radius: 8px;
    width: 400px;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
    animation: terminalGlow 2s ease-in-out infinite alternate;
}

.terminal-header {
    background: var(--gray);
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid var(--primary);
}

.terminal-title {
    color: var(--primary);
    font-size: 14px;
}

.terminal-body {
    padding: 20px;
}

.loading-text {
    margin-bottom: 20px;
    font-size: 16px;
}

.prompt {
    color: var(--primary);
}

.command {
    color: var(--text);
    margin-left: 10px;
}

.cursor {
    color: var(--primary);
    animation: blink 1s infinite;
}

.loading-bar {
    width: 100%;
    height: 4px;
    background: var(--gray);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes terminalGlow {
    0% { box-shadow: 0 0 30px rgba(0, 255, 136, 0.3); }
    100% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.5); }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-50px);
    transition: all 0.8s ease;
}

.navbar.show {
    opacity: 1;
    transform: translateY(0);
}

.brand-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    opacity: 0;
    transition: opacity 1s ease;
}

.main-content.show {
    opacity: 1;
}

.section {
    min-height: calc(100vh - 80px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.section.active {
    display: flex;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Info Box */
.info-box {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(50px);
    opacity: 0;
    transition: all 1s ease;
}

.info-box.animate {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.avatar {
    margin: 0 auto 30px;
    width: 120px;
    height: 120px;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--darker);
    animation: avatarFloat 3s ease-in-out infinite;
    overflow: hidden; /* Add this to contain the image */
    position: relative; /* Add this for proper positioning */
}
.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the circle properly */
    border-radius: 50%;
    border: 3px solid var(--primary); /* Optional: adds a border */
    transition: transform 0.3s ease;
}

.avatar-image:hover {
    transform: scale(1.05); /* Optional: slight zoom on hover */
}

/* Optional: Add a fallback if image fails to load */
.avatar-placeholder::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    z-index: -1;
}

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

.name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 1s ease forwards;
    animation-delay: 0.5s;
}

.title {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 1s ease forwards;
    animation-delay: 0.7s;
}

.description {
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 1s ease forwards;
    animation-delay: 0.9s;
}

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

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-link {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    opacity: 0;
    transform: scale(0);
    animation: popIn 0.6s ease forwards;
}

.social-link:nth-child(1) { animation-delay: 1.1s; }
.social-link:nth-child(2) { animation-delay: 1.2s; }
.social-link:nth-child(3) { animation-delay: 1.3s; }
.social-link:nth-child(4) { animation-delay: 1.4s; }
.social-link:nth-child(5) { animation-delay: 1.5s; }

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.social-link:hover {
    background: var(--primary);
    color: var(--darker);
    border-color: var(--primary);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.social-link:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid var(--primary);
}

/* Projects Section */
.section-title {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.project-card {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.2);
}

.project-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

.project-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text);
}

.project-card p {
    color: var(--text-dim);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .info-box {
        margin: 20px;
        padding: 30px 20px;
    }

    .name {
        font-size: 28px;
    }

    .social-links {
        gap: 15px;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}
