/* Base styles and variables */
:root {
    --primary: #6366f1;
    --secondary: #4f46e5;
    --accent: #f43f5e;
    --text: #f8fafc;
    --dark: #0f172a;
    --light: #f1f5f9;
    --gradient: linear-gradient(135deg, #6366f1, #f43f5e);
    --card-bg: rgba(99, 102, 241, 0.1);
    --timeline-dot: rgba(244, 63, 94, 0.8);
}

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

body {
    background-color: var(--dark);
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transition: width 0.3s, height 0.3s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.1s;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    width: 50%;
    z-index: 1;
}

.hero-image {
    width: 40%;
    height: 70vh;
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    transform: rotate(-5deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: var(--gradient);
    padding: 3px;
}

.hero-image::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient);
    z-index: -1;
    border-radius: 2rem;
    animation: borderGlow 3s ease-in-out infinite;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    transition: transform 0.5s ease;
    border-radius: 1.8rem;
}

.hero-image:hover img {
    transform: scale(1);
}

/* Text Styles */
.glitch-text {
    font-size: 4.5rem;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 2rem;
    opacity: 0;
}

/* Timeline Section */
.timeline-section {
    padding: 8rem 2rem;
    background: rgba(99, 102, 241, 0.05);
    position: relative;
}

.timeline {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% - 100px);
    background: var(--gradient);
    top: 50px;
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 30px);
    position: relative;
    margin: 2rem 0;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 30px);
}

.timeline-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    width: calc(100% - 60px);
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.3);
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--timeline-dot);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    right: -40px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -40px;
    right: auto;
}

.timeline-date {
    color: var(--accent);
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.timeline-company {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.timeline-description {
    color: var(--text);
    opacity: 0.8;
    line-height: 1.8;
}

/* Projects Section */
.work-section {
    padding: 10rem 2rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: pointer;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.2));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Button Styles */
.magnetic-button {
    padding: 1rem 2rem;
    background: var(--gradient);
    color: var(--text);
    border: none;
    border-radius: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.magnetic-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.magnetic-button:hover::before {
    left: 100%;
}

/* Animations */
@keyframes borderGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        padding: 0 3rem;
    }

    .glitch-text {
        font-size: 3.5rem;
    }

    .project-grid {
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        height: auto;
        padding-top: 5rem;
    }

    .hero-content, .hero-image {
        width: 100%;
    }

    .hero-image {
        height: 50vh;
        margin-top: 2rem;
    }

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

    .glitch-text {
        font-size: 2.5rem;
    }

    .timeline::before {
        left: 0;
    }

    .timeline-item {
        padding-right: 0;
        padding-left: 30px;
        width: 100%;
    }

    .timeline-item:nth-child(even) {
        padding-left: 30px;
    }

    .timeline-content {
        width: calc(100% - 30px);
    }

    .timeline-content::before {
        left: -25px !important;
        right: auto !important;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 1rem;
    }

    .glitch-text {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .project-overlay {
        padding: 1rem;
    }

    .project-title {
        font-size: 1.5rem;
    }
}

/* Disable custom cursor on mobile */
@media (max-width: 768px) {
    * {
        cursor: auto !important;
    }

    .cursor, .cursor-follower {
        display: none;
    }
}