/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Page Management */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.page.active {
    opacity: 1;
    visibility: visible;
}

/* Transition States */
.page.transitioning {
    pointer-events: none;
}

.page.fade-to-green {
    background: linear-gradient(135deg, #48bb78, #38a169) !important;
    transition: background 0.6s ease !important;
}

.page.fade-to-purple {
    background: linear-gradient(135deg, #805ad5, #6b46c1) !important;
    transition: background 0.6s ease !important;
}

/* Landing Page Styles */
#landing-page {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: background 0.6s ease, opacity 0.6s ease;
}

.container {
    max-width: 800px;
    padding: 2rem;
}

.greeting h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
    animation: fadeInUp 1s ease-out;
}

.greeting p {
    font-size: 1.25rem;
    color: #718096;
    margin-bottom: 4rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.boxes-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.box {
    width: 250px;
    height: 200px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.box span {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    z-index: 2;
    position: relative;
}

.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    transition: transform 0.3s ease;
}

.box:hover::before {
    transform: scale(1.05);
}

.green-box {
    background: linear-gradient(135deg, #48bb78, #38a169);
    box-shadow: 0 10px 30px rgba(72, 187, 120, 0.3);
}

.purple-box {
    background: linear-gradient(135deg, #805ad5, #6b46c1);
    box-shadow: 0 10px 30px rgba(128, 90, 213, 0.3);
}

.box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Chat Button Styles */
.chat-button-container {
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.chat-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #000000;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.chat-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    background: #333333;
}

/* Humble Brags Button */
.humble-brags-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    z-index: 100;
    font-family: inherit;
}

.humble-brags-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: #000000;
    color: white;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.3s ease-out;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
    font-family: inherit;
}

.modal-close:hover {
    color: #2d3748;
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.brag-images {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.brag-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.brag-image:hover {
    transform: scale(1.02);
}

/* Transition Animation Classes */
.page.fade-to-green {
    background: linear-gradient(135deg, #48bb78, #38a169);
    transition: background 0.6s ease;
}

/* Ensure other elements fade out during transition */
.page.transitioning .greeting,
.page.transitioning .boxes-container {
    opacity: 0;
    transition: opacity 0.4s ease;
}

.page.transitioning .container {
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Resume Page Styles */
#resume-page {
    background: white;
    padding: 0;
}

/* White Container Animation */
.resume-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 90%;
    max-width: 1200px;
    background: white;
    border-radius: 20px 20px 0 0;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.resume-container.slide-in {
    transform: translateX(-50%) translateY(0);
}

.page-header {
    position: fixed;
    top: 2rem;
    left: 5%;
    z-index: 1000;
    background: none;
    padding: 0;
    border-bottom: none;
}

#reality-page .page-header {
    z-index: 20;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: none;
}

.back-btn:hover {
    background: none;
    color: rgba(255, 255, 255, 0.8);
    transform: none;
    box-shadow: none;
}

.resume-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.resume-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideInFromTop 0.8s ease-out;
}

.resume-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.resume-header .title {
    font-size: 1.25rem;
    color: #4a5568;
    margin-bottom: 1rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: #718096;
}

.resume-section {
    margin-bottom: 3rem;
    animation: slideInFromLeft 0.8s ease-out;
}

.resume-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.experience-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.job-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.job-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.company {
    font-weight: 600;
    color: #48bb78;
    margin: 0;
}

.date {
    color: #718096;
    font-size: 0.9rem;
    margin: 0;
    text-align: right;
    white-space: nowrap;
}

.experience-item ul {
    list-style: none;
    padding-left: 0;
}

.experience-item li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.experience-item li::before {
    content: '•';
    color: #48bb78;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.education-item {
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
}

.education-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

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

.skill-category {
    padding: 1.5rem;
    background: #f7fafc;
    border-radius: 12px;
}

.skill-category h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

/* Reality Page Styles */
#reality-page {
    background: transparent;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.reality-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    padding: 2rem;
    pointer-events: none;
}

.reality-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-align: center;
    margin-bottom: 0.5rem;
    animation: slideInFromTop 0.8s ease-out;
}

.reality-content .subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    animation: slideInFromTop 0.8s ease-out 0.2s both;
}

/* Physics Container Styles */
.physics-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #805ad5, #6b46c1);
    z-index: 1;
    overflow: hidden;
    transition: background 0.6s ease;
}

.image-pile-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.physics-image {
    position: absolute;
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    pointer-events: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.physics-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.physics-image:active {
    cursor: grabbing;
}

.physics-image.picked-up {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 0 2px rgba(255, 255, 255, 0.8);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.physics-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* Responsive image scaling for physics images */
@media (min-width: 1200px) {
    .physics-image {
        /* Large screens: 50% of natural size */
        --image-scale: 0.5;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .physics-image {
        /* Medium screens: 40% of natural size */
        --image-scale: 0.4;
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .physics-image {
        /* Small screens: 30% of natural size */
        --image-scale: 0.3;
    }
}

@media (max-width: 479px) {
    .physics-image {
        /* Extra small screens: 25% of natural size */
        --image-scale: 0.25;
    }
}

/* Mobile touch optimizations */
@media (max-width: 768px) {
    .physics-image {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .physics-image:active {
        transform: scale(1.05);
    }
}


/* Floating boxes styles (keeping for reference) */
.floating-boxes {
    position: relative;
    min-height: 600px;
}

.floating-box {
    position: absolute;
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    animation: floatIn 1s ease-out;
    transition: all 0.3s ease;
}

.floating-box:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.floating-box h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.floating-box p {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Animation Delays for Floating Boxes */
.floating-box:nth-child(1) { animation-delay: 0.3s; }
.floating-box:nth-child(2) { animation-delay: 0.5s; }
.floating-box:nth-child(3) { animation-delay: 0.7s; }
.floating-box:nth-child(4) { animation-delay: 0.9s; }
.floating-box:nth-child(5) { animation-delay: 1.1s; }
.floating-box:nth-child(6) { animation-delay: 1.3s; }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .greeting h1 {
        font-size: 2.5rem;
    }
    
    .boxes-container {
        flex-direction: column;
        align-items: center;
    }
    
    .box {
        width: 280px;
        height: 150px;
    }
    
    .chat-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .humble-brags-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        padding: 0.625rem 1.25rem;
        font-size: 0.8rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95%;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .job-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .job-header-left {
        width: 100%;
    }
    
    .date {
        align-self: flex-end;
        text-align: right;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .floating-box {
        position: relative;
        margin-bottom: 1rem;
        max-width: 100%;
    }
    
    .floating-boxes {
        min-height: auto;
    }
    
    .physics-container {
        height: 100vh;
    }
    
    .physics-image {
        /* Images will scale based on CSS custom properties */
        touch-action: manipulation;
    }
    
    .resume-container {
        max-height: 95vh;
    }
    
    /* Mobile back button fixes */
    .page-header {
        top: 1rem;
        left: 1rem;
        z-index: 1001;
    }
    
    .back-btn {
        background: none;
        color: white;
        padding: 0.5rem 1rem;
        font-size: 1rem;
        font-weight: 600;
    }
    
    .back-btn:hover {
        background: none;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .resume-container {
        max-height: 95vh;
        top: 5rem; /* Position from top to leave space for back button */
        bottom: 0; /* Keep original bottom positioning */
        padding-top: 2rem; /* Keep original padding for content spacing */
        transform: translateX(-50%) translateY(0); /* Remove slide-in animation on mobile */
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .greeting h1 {
        font-size: 2rem;
    }
    
    .box {
        width: 250px;
        height: 120px;
    }
    
    .chat-button {
        padding: 0.75rem 1.75rem;
        font-size: 0.9rem;
    }
    
    .humble-brags-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .modal-content {
        width: 98%;
        max-height: 98%;
    }
    
    .modal-header {
        padding: 0.875rem 1.25rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .resume-content {
        padding: 1rem 0;
    }
    
    .physics-container {
        height: 100vh;
    }
    
    .physics-image {
        /* Images will scale based on CSS custom properties */
        touch-action: manipulation;
    }
    
    /* Extra small mobile back button fixes */
    .page-header {
        top: 0.75rem;
        left: 0.75rem;
    }
    
    .back-btn {
        background: none;
        color: white;
        padding: 0.4rem 0.8rem;
        font-size: 1rem;
        font-weight: 600;
    }
    
    .back-btn:hover {
        background: none;
        color: rgba(255, 255, 255, 0.8);
    }
    
    .resume-container {
        top: 4rem; /* Position from top to leave space for back button */
        bottom: 0; /* Keep original bottom positioning */
        padding-top: 1rem; /* Keep original padding for content spacing */
        transform: translateX(-50%) translateY(0); /* Remove slide-in animation on mobile */
    }
} 