:root {
    --primary: #ff1a1a;
    --secondary: #4a0404;
    --tertiary: #800000;
    --quaternary: #ff4d4d;
    --text-dark: #e0e0e0;
    --text-light: #fff;
    --glass-bg: rgba(15, 10, 10, 0.8);
    --glass-border: rgba(255, 26, 26, 0.3);
    --shadow: 0 8px 32px 0 rgba(255, 26, 26, 0.2);
}

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

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #1a0505 0%, #000000 100%);
    background-color: #050505;
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Background animated shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    animation: float 10s infinite ease-in-out alternate;
}

.shape1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape2 {
    width: 300px;
    height: 300px;
    background: var(--tertiary);
    bottom: 10%;
    right: -50px;
    animation-delay: -3s;
}

.shape3 {
    width: 250px;
    height: 250px;
    background: var(--quaternary);
    top: 40%;
    left: 20%;
    animation-delay: -6s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.container {
    max-width: 900px;
    width: 90%;
    margin: 40px auto;
    z-index: 10;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--glass-border);
    border-radius: 30px;
    box-shadow: var(--shadow);
    padding: 40px;
    margin-bottom: 30px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-5px);
}

/* Hero Section */
.hero {
    text-align: center;
}

.avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.avatar {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 4px solid var(--primary);
    transition: transform 0.5s ease;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-container:hover .avatar {
    transform: rotate(10deg) scale(1.05);
}

.badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #111;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: bounce 2s infinite;
}

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

.title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #ff1a1a;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.wave {
    display: inline-block;
    animation: wave-animation 2.5s infinite;
    transform-origin: 70% 70%;
}

@keyframes wave-animation {
    0% { transform: rotate( 0.0deg) }
    10% { transform: rotate(14.0deg) }  
    20% { transform: rotate(-8.0deg) }
    30% { transform: rotate(14.0deg) }
    40% { transform: rotate(-4.0deg) }
    50% { transform: rotate(10.0deg) }
    60% { transform: rotate( 0.0deg) }
    100% { transform: rotate( 0.0deg) }
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff4d4d;
    margin-bottom: 20px;
}

.description {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 30px;
    color: #ccc;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-btn {
    text-decoration: none;
    color: var(--text-dark);
    background: rgba(30, 30, 30, 0.8);
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-btn:hover {
    background: #ff1a1a;
    color: #fff;
    border-color: #ff1a1a;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 26, 26, 0.3);
}

/* Skills Section */
h2 {
    font-family: 'Fredoka One', cursive;
    text-align: center;
    color: #ff4d4d;
    margin-bottom: 30px;
    font-size: 2rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.skill-item {
    background: rgba(20, 20, 20, 0.7);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px dashed #4a0404;
}

.skill-item:hover {
    transform: scale(1.05);
    background: #111;
    border-color: #ff1a1a;
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.3s;
}

.skill-item:hover .skill-icon {
    transform: rotate(15deg) scale(1.2);
}

.skill-item h3 {
    font-size: 1.2rem;
    color: #ff1a1a;
    margin-bottom: 10px;
}

.skill-item p {
    font-size: 0.95rem;
    color: #aaa;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-weight: 600;
    margin-top: auto;
    width: 100%;
}

/* Sparkles container */
.sparkles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: transparent;
    border-radius: 50%;
    box-shadow: 
        0 -10px 0 0 #ff1a1a,
        10px 0 0 0 #ff1a1a,
        0 10px 0 0 #ff1a1a,
        -10px 0 0 0 #ff1a1a;
    animation: sparkle-anim 2s linear forwards;
}

@keyframes sparkle-anim {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    50% { transform: scale(1) rotate(90deg); opacity: 1; }
    100% { transform: scale(0) rotate(180deg); opacity: 0; }
}

/* Portfolio Section */
.portfolio-section {
    width: 100%;
    margin-bottom: 40px;
}

.portfolio-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

.portfolio-card {
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    margin-bottom: 0;
    transition: all 0.3s ease;
    background: rgba(15, 10, 10, 0.6);
    border-radius: 20px;
    border: 2px solid var(--glass-border);
    overflow: hidden;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    background: rgba(20, 15, 15, 0.9);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(255, 26, 26, 0.2);
}

.portfolio-img {
    width: 100%;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-bottom: 2px solid var(--glass-border);
}

.portfolio-content {
    padding: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portfolio-content h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.portfolio-content p {
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

@media (min-width: 768px) {
    .portfolio-card {
        flex-direction: row;
        align-items: stretch;
    }
    .portfolio-img {
        width: 50%;
    }
    .portfolio-img img {
        border-bottom: none;
        border-right: 2px solid var(--glass-border);
    }
    .portfolio-content {
        width: 50%;
    }
}

/* Contact Section */
.contact-section {
    margin-top: 40px;
    padding: 50px 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border-radius: 12px;
    border: 2px solid rgba(255, 26, 26, 0.1);
    background: rgba(10, 10, 10, 0.6);
    color: var(--text-light);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 26, 26, 0.3);
    background: rgba(20, 20, 20, 0.9);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #888;
}

.submit-btn {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 30px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-self: center;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.submit-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 26, 26, 0.4);
}

/* Portfolio Link Button */
.portfolio-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.portfolio-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 26, 26, 0.4);
}

/* Chatbot Styles */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 26, 26, 0.4);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: rgba(15, 10, 10, 0.95);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 1000;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.chatbot-container.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chatbot-header {
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-weight: bold;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

.ai-message {
    background: rgba(40, 20, 20, 0.8);
    color: #fff;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(255,26,26,0.2);
}

.user-message {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chatbot-input {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(255, 26, 26, 0.2);
}

.chatbot-input input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid rgba(255,26,26,0.3);
    background: rgba(0,0,0,0.5);
    color: white;
    outline: none;
}

.chatbot-input input:focus {
    border-color: var(--primary);
}

.chatbot-input button {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.chatbot-input button:hover {
    background: var(--tertiary);
}

@media (max-width: 600px) {
    .title {
        font-size: 2rem;
    }
    
    .social-links {
        flex-direction: column;
    }

    .service-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .chatbot-container {
        width: 90%;
        height: 400px;
        right: 5%;
        bottom: 90px;
    }
}
