:root {
    --bg-dark: #0A0D18;
    --bg-card: #141727;
    --text-primary: #E6EEF8;
    --text-secondary: #ABB1C1;
    --accent-blue: #06B6D4;
    --accent-purple: #7C3AED;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-shadow: 0 8px 30px rgba(124, 58, 237, 0.25);
    --whatsapp-green: #25D366;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Base Styles */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background-color: var(--bg-dark);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero {
    background: linear-gradient(45deg, rgba(20, 23, 39, 0.8), rgba(26, 31, 48, 0.8));
    padding: 6rem 0;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--accent-purple);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.4);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.6);
}

h1 {
    font-size: 3.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 300;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.badges span {
    background: linear-gradient(45deg, rgba(20, 23, 39, 0.7), rgba(26, 31, 48, 0.7));
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.badges span:hover {
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.bio {
    max-width: 650px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
    border: none;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--accent-purple);
    color: var(--accent-purple);
}

.btn-secondary:hover {
    background: var(--accent-purple);
    color: #fff;
}

.whatsapp-btn {
    background-color: var(--whatsapp-green);
    color: #fff;
    border: none;
}

.whatsapp-btn:hover {
    opacity: 0.9;
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.25);
}

.section {
    padding: 6rem 0;
}

.section h2 {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3.5rem;
    color: var(--text-primary);
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Timeline for Experience */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    padding: 1.5rem;
    background-color: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transform: translateX(-50%);
    opacity: 0;
    transition: all 0.6s ease-out;
}

.timeline-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item:nth-child(even) {
    transform: translateX(50%);
}

.timeline-item:nth-child(even).is-visible {
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    transform: translateY(-50%);
    z-index: 2;
    border: 2px solid var(--bg-dark);
}

.timeline-content {
    text-align: left;
    max-width: 45%;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 55%;
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1rem;
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    float: right;
}

.timeline-content ul {
    list-style-type: none;
    padding-left: 0;
}

.timeline-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.timeline-content li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-purple);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.project-card, .skill-group, .skill-bars-container {
    background-color: var(--bg-card);
    padding: 2.2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover, .skill-group:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.project-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.7rem;
    color: var(--text-primary);
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.tech-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.tech-list li {
    background-color: rgba(45, 48, 67, 0.7);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.link {
    display: inline-block;
    color: var(--accent-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
    margin-top: 0.5rem;
}

.link:hover {
    color: var(--accent-purple);
    transform: translateX(5px);
}

.view-details-btn {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.view-details-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.skill-group h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
}

.skill-group ul {
    list-style: none;
}

.skill-group li {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    position: relative;
    padding-left: 1.2rem;
}

.skill-group li i {
    color: var(--accent-purple);
    margin-right: 0.5rem;
}

.contact-section {
    text-align: center;
    padding-bottom: 6rem;
}

.contact-section p {
    max-width: 650px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.contact-form-container form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form-container input,
.contact-form-container textarea {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.contact-form-container textarea {
    resize: vertical;
}

.or-separator {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--text-secondary);
}

.or-separator::before,
.or-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background-color: var(--border-color);
}

.or-separator::before {
    left: 0;
}

.or-separator::after {
    right: 0;
}

.or-separator span {
    background-color: var(--bg-card);
    padding: 0 1rem;
}

.other-links {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

footer {
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
}

.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }
.delay-3 { animation-delay: 1.5s; }

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

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.lightbox-content {
    background-color: var(--bg-card);
    margin: auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.4s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

#lightbox-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

#lightbox-description {
    font-size: 1rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.7;
}

.close-btn {
    color: var(--text-secondary);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover, .close-btn:focus {
    color: var(--accent-purple);
    text-decoration: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
    }
    .tagline {
        font-size: 1.1rem;
    }
    .section h2 {
        font-size: 2.2rem;
    }
    .hero {
        padding: 4rem 0;
    }
    .project-card, .skill-group, .skill-bars-container, .contact-form-container {
        padding: 1.5rem;
    }
    .project-grid, .skills-grid {
        gap: 1.5rem;
    }
    .profile-img {
        width: 120px;
        height: 120px;
    }
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    .cta-group, .other-links {
        flex-direction: column;
        gap: 0.8rem;
    }
    .timeline::after {
        left: 30px;
    }
    .timeline-item, .timeline-item:nth-child(even) {
        transform: none;
    }
    .timeline-item, .timeline-item:nth-child(even), .timeline-content {
        margin: 0;
        padding-left: 55px;
        max-width: 100%;
        text-align: left;
    }
    .timeline-dot {
        left: 21px;
    }
}