/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style-type: none;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #111;
}

/* Slideshow container */
.slideshow-container {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    transform-origin: center center;
}

/* Individual slides */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    padding: 2rem;
    transform-origin: center center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

/* Slide content */
.slide-content {
    max-width: 1200px;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out;
    gap: 1.5rem;
}

/* Logo slide specific styles */
#logo-slide .slide-content {
    color: rgba(255, 255, 255, 0.8);
}

#logo-slide h1,
#logo-slide p {
    color: rgba(255, 255, 255, 0.8);
}

.slide.active .slide-content {
    transform: translateY(0);
    opacity: 1;
}

/* Typography */
h1 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

h3 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    margin-bottom: 1.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.01em;
    line-height: 1.4;
    margin-top: -0.15rem;
}

p {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    letter-spacing: 0.01em;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Images */
.logo, .project-image {
    width: clamp(150px, 20vw, 300px);
    height: clamp(150px, 20vw, 300px);
    margin: 0;
    display: block;
    object-fit: contain;
}

.logo {
    animation: float 3s ease-in-out infinite;
}

.project-image {
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

/* Contact section */
.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.contact-info p {
    font-size: clamp(1.1rem, 1.6vw, 1.3rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.8);
}

.social-links {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    justify-content: center;
    width: 100%;
}

.social-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.social-icon {
    width: 24px;
    height: 24px;
    transition: all 0.3s ease;
}

.social-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: rgba(255, 255, 255, 0.8);
    transition: width 0.3s ease;
}

.social-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.social-link:hover .social-icon {
    transform: scale(1.1);
}

.social-link:hover::after {
    width: 100%;
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding-top: 15px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(17, 17, 17, 0.8);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.01em;
    font-size: 0.9rem;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .slideshow-container {
        transform: scale(0.85);
    }

    .slide-content {
        width: 95%;
    }

    .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    .project-image {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .slideshow-container {
        transform: scale(0.75);
    }
}

@media (max-height: 600px) {
    .slideshow-container {
        transform: scale(0.8);
    }
}

@media (max-width: 320px) or (max-height: 480px) {
    .slideshow-container {
        transform: scale(0.65);
    }
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}

.scroll-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.scroll-dot.active {
    background-color: #000000;
    transform: scale(1.2);
    border-color: #ffffff;
}

@media (max-width: 768px) {
    .scroll-indicator {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    footer {
        transform: scale(0.75);
    }
}

@media (max-height: 600px) {
    footer {
        transform: scale(0.8);
    }
}

@media (max-width: 320px) or (max-height: 480px) {
    footer {
        transform: scale(0.65);
    }
}

/* Demo Button */
.demo-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    backdrop-filter: blur(5px);
}

.demo-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

.demo-button:active {
    transform: translateY(0);
}

/* Logo slide specific button styles */
#logo-slide .demo-button {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
}

#logo-slide .demo-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Add this new class for when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Add this to calculate scrollbar width */
:root {
    --scrollbar-width: 0px;
}

/* Calculate scrollbar width on load */
@media screen and (min-width: 768px) {
    :root {
        --scrollbar-width: calc(100vw - 100%);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(5px);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding: 20px;
    box-sizing: border-box;
    overscroll-behavior: contain; /* Prevent scroll chaining */
}

.modal-content {
    position: relative;
    background-color: #111111;
    margin: 2rem auto;
    width: 90%;
    max-width: 1200px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
    max-height: calc(100vh - 40px); /* Account for modal padding */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) #111111;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overscroll-behavior: contain; /* Prevent scroll chaining */
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #111111;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 2px solid #111111;
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    z-index: 1;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

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

/* Update case study styles for modal */
.modal .case-study {
    padding: 0;
    min-height: auto;
}

.modal .case-study-content {
    padding: 3rem 2rem;
}

.modal .case-study-header {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem auto;
    }

    .modal .case-study-content {
        padding: 2rem 1rem;
    }

    .modal-close {
        right: 1rem;
        top: 0.5rem;
    }
}

/* Loading and Error States */
.loading, .error {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.loading::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

.error {
    color: #ff6b6b;
}

@keyframes loadingDots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Case Study Styles */
.case-study {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Poppins', sans-serif;
}

.case-study-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Section */
.case-study-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 1rem;
}

.case-study-header img {
    width: 180px;
    height: 180px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.case-study-header img:hover {
    transform: scale(1.05);
}

.case-study-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.case-study-header h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
}

/* Section Styles */
.case-study-section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.case-study-section:nth-child(2) { animation-delay: 0.1s; }
.case-study-section:nth-child(3) { animation-delay: 0.2s; }
.case-study-section:nth-child(4) { animation-delay: 0.3s; }
.case-study-section:nth-child(5) { animation-delay: 0.4s; }
.case-study-section:nth-child(6) { animation-delay: 0.5s; }

.case-study-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    padding-bottom: 0.8rem;
}

.case-study-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    border-radius: 2px;
}

.case-study-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    max-width: 800px;
}

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 2rem 0;
}

.tech-item {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.tech-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Features List */
.case-study-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-study-section ul li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    list-style-type: none;
}

.case-study-section ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.case-study-section ul li:hover::before {
    transform: translateX(4px);
    color: rgba(255, 255, 255, 0.9);
}

/* Gallery */
.case-study-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.case-study-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.case-study-gallery img:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .case-study-content {
        padding: 0 1.5rem;
    }

    .case-study-header {
        margin-bottom: 3rem;
    }

    .case-study-header h1 {
        font-size: 2.2rem;
    }

    .case-study-header h3 {
        font-size: 1.2rem;
    }

    .case-study-section {
        margin-bottom: 3rem;
    }

    .case-study-section h2 {
        font-size: 1.6rem;
    }

    .case-study-section p {
        font-size: 1rem;
    }

    .case-study-gallery {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .case-study-gallery img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .case-study-content {
        padding: 0 1rem;
    }

    .case-study-header h1 {
        font-size: 1.8rem;
    }

    .case-study-header img {
        width: 140px;
        height: 140px;
    }

    .tech-stack {
        gap: 0.6rem;
    }

    .tech-item {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
} 