/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066cc;
    --secondary: #02368C;
    --accent: #00256B;
    --success: #10b981;
    --background: #0a0f1a;
    --surface: #0f1929;
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated Background Gradient */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg,
        var(--background) 0%,
        #0a1929 25%,
        #002855 50%,
        #001a3d 75%,
        var(--background) 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Header */
.header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    position: relative;
    z-index: 10;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.header-photo-container {
    width: 200px;
    height: 200px;
    margin: 0.75rem auto 0.75rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(0, 102, 204, 0.4);
    box-shadow: 0 8px 32px rgba(0, 102, 204, 0.3);
}

.header-photo {
    width: 100%;
    height: 100%;
    min-height: auto !important;
    background: transparent;
    border-radius: 0;
}

.header-photo .face-image {
    border-radius: 0;
}

.title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(135deg, #0088ff, var(--primary), var(--secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientText 5s ease infinite;
    margin-bottom: 0.25rem;
}

@keyframes gradientText {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.subtitle {
    font-size: 1.6rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Glass Button */
.glass-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.glass-button:hover::before {
    left: 100%;
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 102, 204, 0.4);
}

/* Project Steps Navigation */
.project-steps {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.project-steps-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-steps-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    white-space: nowrap;
}

.steps-links {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.step-link {
    padding: 0.3rem 1rem;
    background: rgba(0, 102, 204, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.step-link:hover {
    background: rgba(0, 102, 204, 0.25);
    border-color: rgba(0, 102, 204, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

.step-separator {
    color: var(--primary);
    font-size: 1.2rem;
    opacity: 0.5;
}

/* Timeline Container */
.timeline-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
}

/* Timeline Line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--primary) 10%,
        var(--secondary) 50%,
        var(--accent) 90%,
        transparent 100%
    );
    transform: translateX(-50%);
    border-radius: 2px;
    opacity: 0.3;
}

/* Bubble Container */
.bubble-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease calc(var(--delay)) both;
    position: relative;
    scroll-margin-top: 100px;
    align-items: stretch;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alternate left/right positioning */
.bubble-container:nth-child(even) .bubble {
    grid-column: 1;
    grid-row: 1;
}

.bubble-container:nth-child(even) .project-screenshot {
    grid-column: 2;
    grid-row: 1;
}

.bubble-container:nth-child(odd) .bubble {
    grid-column: 2;
    grid-row: 1;
}

.bubble-container:nth-child(odd) .project-screenshot {
    grid-column: 1;
    grid-row: 1;
}

/* Glass Card - The Bubble */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    height: 100%;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    display: flex;
    flex-direction: column;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(0, 136, 255, 0.1) 0%,
        rgba(0, 102, 204, 0.1) 50%,
        rgba(2, 54, 140, 0.1) 100%
    );
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(0, 102, 204, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Special glow for AI bubble */
.special-glow {
    border-color: rgba(0, 102, 204, 0.3);
}

.special-glow::before {
    background: linear-gradient(135deg,
        rgba(0, 136, 255, 0.2) 0%,
        rgba(0, 102, 204, 0.2) 50%,
        rgba(2, 54, 140, 0.2) 100%
    );
    opacity: 0.5;
}

.special-glow:hover {
    box-shadow:
        0 20px 60px rgba(0, 102, 204, 0.5),
        0 0 80px rgba(0, 102, 204, 0.3),
        0 0 0 1px rgba(0, 102, 204, 0.3);
}

/* Bubble Icon */
.bubble-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.bubble-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bubble-description {
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Bubble Content */
.bubble-content {
    display: block;
    flex: 1;
    overflow-y: auto;
}

/* Content Wrapper - no longer needed for flex layout */
.bubble-content-wrapper {
    display: block;
}

.bubble-main {
    width: 100%;
}

/* Skills */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.skill-tag {
    padding: 0.4rem 0.8rem;
    background: rgba(0, 102, 204, 0.2);
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(0, 102, 204, 0.35);
    transform: scale(1.05);
}

/* Proof Section */
.proof-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.proof-section ul {
    list-style: none;
    margin-bottom: 1rem;
}

.proof-section li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dim);
}

.proof-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.proof-section strong {
    color: var(--text);
}

/* Inline Links */
.inline-link {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    color: var(--primary);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.inline-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Project Links */
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.project-link.special {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
}

.project-link.special:hover {
    background: rgba(236, 72, 153, 0.25);
    border-color: rgba(236, 72, 153, 0.5);
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-badge {
    padding: 0.4rem 0.8rem;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
    color: var(--success);
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

.footer-content p {
    color: var(--text-dim);
    margin: 0.5rem 0;
}

.footer-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-social {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
}

.footer-social-link:hover {
    color: var(--secondary);
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .timeline-line {
        left: 2rem;
    }

    .bubble-container:nth-child(even),
    .bubble-container:nth-child(odd) {
        justify-content: flex-start;
        padding-left: 5rem;
        padding-right: 2rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 2rem 1rem;
    }

    .social-links {
        gap: 0.5rem;
    }

    .glass-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .glass-button svg {
        width: 16px;
        height: 16px;
    }

    .project-steps {
        padding: 0.5rem 0.75rem;
    }

    .project-steps-content {
        gap: 0.5rem;
    }

    .project-steps-title {
        display: none;
    }

    .steps-links {
        gap: 0.2rem;
    }

    .step-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .step-separator {
        font-size: 0.9rem;
    }

    .timeline-container {
        padding: 2rem 0rem;
    }

    .timeline-line {
        display: none;
    }

    .bubble-container {
        margin-bottom: 2rem;
    }

    .bubble-container:nth-child(even),
    .bubble-container:nth-child(odd) {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .glass-card {
        padding: 0.75rem;
    }

    .bubble-icon {
        font-size: 2.5rem;
    }

    .bubble-title {
        font-size: 1.5rem;
    }

    .project-links {
        flex-direction: column;
    }

    .project-link {
        width: 100%;
        justify-content: center;
    }
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary), var(--accent));
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text);
}

/* Project Screenshot - same height as bubble */
.project-screenshot {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-screenshot:hover {
    box-shadow: 0 12px 48px rgba(99, 102, 241, 0.4);
    border-color: rgba(99, 102, 241, 0.3);
}

.project-screenshot-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.project-screenshot img,
.project-screenshot video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.project-screenshot-caption {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.project-screenshot-caption p {
    font-size: 0.875rem;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.project-screenshot-caption .project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 102, 204, 0.15);
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.project-screenshot-caption .project-link:hover {
    background: rgba(0, 102, 204, 0.3);
    border-color: rgba(0, 102, 204, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* Responsive: stack on smaller screens */
@media (max-width: 1024px) {
    .bubble-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .bubble-container:nth-child(even) .bubble,
    .bubble-container:nth-child(odd) .bubble {
        grid-column: 1;
        grid-row: 1;
    }

    .bubble-container:nth-child(even) .project-screenshot,
    .bubble-container:nth-child(odd) .project-screenshot {
        grid-column: 1;
        grid-row: 2;
        height: auto;
    }
}

/* Scroll Hint */
.scroll-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    background: rgba(0, 102, 204, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 102, 204, 0.2);
    border-radius: 12px;
    color: #94a3b8;
    font-size: 0.875rem;
    z-index: 100;
    opacity: 0;
    animation: fade-in-hint 0.5s ease 2s forwards, fade-out-hint 0.5s ease 8s forwards;
    pointer-events: none;
    text-align: center;
    max-width: 90%;
}

@media (max-width: 768px) {
    .scroll-hint {
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: none;
        width: calc(100% - 2rem);
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

@keyframes fade-in-hint {
    to { opacity: 1; }
}

@keyframes fade-out-hint {
    to { opacity: 0; }
}
