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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--dark);
    color: var(--light);
    overflow: hidden;
}

.frames-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.frames-container::-webkit-scrollbar {
    display: none;
}

.frame {
    min-height: 100vh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.frame-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.nav-dots {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.nav-dot.active {
    background: var(--primary);
    transform: scale(1.3);
}

.nav-dot:hover {
    background: var(--primary);
}

.scroll-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.scroll-btn.down {
    bottom: 2rem;
}

.scroll-btn.up {
    top: 2rem;
}

.scroll-btn:hover {
    background: var(--primary);
    color: white;
}

.scroll-btn.down:hover {
    transform: translateX(-50%) translateY(5px);
}

.scroll-btn.up:hover {
    transform: translateX(-50%) translateY(-5px);
}

/* Hide up button on first frame */
#frame-0 .scroll-btn.up {
    display: none;
}

.scroll-btn.down svg {
    animation: bounce 2s infinite;
}

.scroll-btn.up svg {
    animation: bounceUp 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes bounceUp {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(10px); }
    60% { transform: translateY(5px); }
}

/* Frame 1 - Summary */
#frame-0 {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
}

.summary {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.summary h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--gray);
    margin-bottom: 1.5rem;
}

.description {
    font-size: 1.1rem;
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.skill {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid var(--primary);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--primary);
}

/* Frame 2 - Projects Grid */
#frame-1 {
    background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark) 100%);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), transparent);
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.project-overlay p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Frame 3, 4 - Project Details */
#frame-2, #frame-3 {
    background: var(--dark);
}

.project-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.project-images {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.project-images img {
    width: 100%;
    height: auto;
    display: block;
}

.project-info h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-summary {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--primary);
}

.project-features {
    list-style: none;
}

.project-features li {
    padding: 0.5rem 0;
    color: var(--gray);
    position: relative;
    padding-left: 1.5rem;
}

.project-features li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
}

/* Frame 5 - Contact */
#frame-4 {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
}

.contact-section {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--light);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #10b981;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.ajax-alert {
    animation: slideIn 0.3s ease;
}

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

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-light);
    border-radius: 12px;
    color: var(--gray);
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-dots {
        right: 1rem;
    }

    .frame {
        padding: 1.5rem;
    }

    .project-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    }

    .scroll-btn {
        bottom: 1.5rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .skills {
        gap: 0.5rem;
    }

    .skill {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .tech-stack span {
        font-size: 0.75rem;
    }
}
