@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css');

:root {
    --primary-color: #b21f1f;
    --secondary-color: #1a2a6c;
    --accent-color: #fdbb2d;
    --background-color: #f0f4f8;
    --text-color: #333;
    --card-background: #ffffff;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

header {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color), var(--accent-color));
    color: #fff;
    text-align: center;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    animation: backgroundScroll 60s linear infinite;
}

@keyframes backgroundScroll {
    from { transform: translateY(0); }
    to { transform: translateY(-100%); }
}

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

.title {
    font-size: 1.5rem;
    opacity: 1;
    position: relative;
    z-index: 1;
}

main {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f0f4f8, #e1e5ea);
}

section {
    background: var(--card-background);
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease, border-left-color 0.3s ease;
    border-left: 5px solid var(--accent-color);
}

section:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transform: translateY(-5px);
    border-left-color: var(--primary-color);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.section-icon {
    margin-right: 10px;
    color: var(--secondary-color);
    cursor: pointer;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.section-icon.spinning {
    animation: spin 0.5s cubic-bezier(.2, .5, .5, .8); /* Faster spin, not infinite */
}

.section-icon.continuous-spinning {
    animation: spin 0.9s linear infinite; /* Faster, continuous spin */
}

h3 {
    color: var(--secondary-color);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.skill {
    background: var(--secondary-color);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.skill:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    animation: pulse 0.5s ease-in-out;
}

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

.skill.active {
    background-color: var(--primary-color);
}

.skill-details {
    background: #f7f9fa;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    display: none;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.experience-item, .project-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f7f9fa;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.experience-item:hover, .project-item:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.experience-item h3, .project-item h3 {
    margin-bottom: 0.25rem;
    color: var(--secondary-color);
}

.experience-date {
    font-style: italic;
    color: #777;
    margin-bottom: 0.5rem;
}

ul {
    list-style-position: inside;
    margin-left: 1rem;
}

#contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

#contact-info p {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
}

#contact-info p i {
    margin-right: 10px;
}

#contact-info p a {
    color: #fff;
    text-decoration: none;
}

#contact-info p a:hover {
    text-decoration: underline;
}

.tech-icons {
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.tech-icons i {
    font-size: 2rem;
    margin: 0 1rem;
    opacity: 0;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(253, 187, 45, 0.5);
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .title {
        font-size: 1rem;
    }

    .tech-icons i {
        font-size: 1.5rem;
        margin: 0 0.5rem;
    }
}