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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #141414;
    color: #e0e0e0;
    line-height: 1.6;
    zoom: 140%;
}

.container {
    max-width: none;
    width: 80%;
    margin: 0 auto;
    padding: 2rem;
}

/* Title Card */
.title-card {
    text-align: center;
    padding: 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
    margin-bottom: 2rem;
}

.title-card h1 {
    font-size: 4rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.title-card p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #999;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.title-card sub {
    font-size: 1rem;
    font-weight: 600;
    color: #888;
}

.title-card a {
    color: #fff;
    text-decoration: underline;
    font-size: 1rem;
}

/* Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    width: 100%;
}

/* Project Card */
.project-card {
    background: #1a1a1a;
    border: 2px solid #333;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.1s linear;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    opacity: 0.5;
    z-index: 0;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(26, 26, 26, 0.5) 0%, 
        rgba(26, 26, 26, 0.85) 50%, 
        rgba(26, 26, 26, 1) 100%);
    z-index: 1;
}

.project-card > * {
    position: relative;
    z-index: 2;
}

.project-card:hover {
    border-color: #ffffff;
    transform: translateY(-2px);
}

.project-card:hover::before {
    opacity: 0.15;
}

.project-header{
    margin-bottom: 1rem;
}

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: .25rem;
}

.project-card .tech {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.project-card .description {
    color: #ccc;
    line-height: 1.5;
    margin-top: auto;
}

/* Project Details Modal */
.project-details {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.project-details.active {
    visibility: visible;
}

.project-details.visible {
    background: rgba(0, 0, 0, 0.75);
    opacity: 1;
    pointer-events: auto;
}

.details-content {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    background: #0a0a0a;
    border: 1px solid #333;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.project-details.visible .details-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-btn {
    float: right;
    font-size: 2.5rem;
    font-weight: 800;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding-top: .55rem;
}

.close-btn:hover {
    color: #ff5353;
}

.details-content h2 {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
}

.details-content .tech-stack {
    color: #888;
    margin-bottom: 0;
    margin-top: 0;
    font-size: 1.1rem;
}

.details-content .content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
}

.details-content .content h3 {
    margin-top: 1rem;
    margin-bottom: 0;
    font-weight: 400;
    color: #fff;
}

.details-content .content p {
    margin-top: auto;
    margin-bottom: 1rem;
}

.details-content .content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.details-content .content a {
    color: #fff;
    text-decoration: underline;
}

/* Media */
.image-wrapper {
    text-align: center;
    margin: 1rem 0;
}

.project-image {
    max-width: 100%;
    max-height: 20rem;
    margin: 1rem 0;
    border: none;
    display: inline-block;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    margin: 1rem 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #333;
}

/* Slideshow styles */
.slide {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.1s ease;
    pointer-events: none;
}

.slide.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

/* Update slideshow container to handle absolute positioning */
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: 1rem 0;
    /* Height will be set by the active slide */
}

/* Ensure images maintain their aspect ratio */
.slide img {
    max-width: 100%;
    max-height: 20rem;
    display: block;
    margin: 0 auto;
}
/* Slideshow controls */
.slideshow-controls {
    text-align: center;
    margin-top: 1rem;
    position: relative;
    z-index: 10;
}

.slide-caption {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    color: #999;
    font-style: italic;
    font-size: 0.95rem;
    text-align: center;
    padding: 0 1rem;
}

.slide-prev,
.slide-next {
    cursor: pointer;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #999;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.slide-prev:hover,
.slide-next:hover {
    color: #fff;
    border-color: #666;
}

/* Slide indicators */
.slide-indicators {
    text-align: center;
    margin-top: 0.5rem;
}

.dot {
    height: 8px;
    width: 8px;
    margin: 0 4px;
    background-color: #333;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #999;
}

.dot:hover {
    background-color: #666;
}

@media (max-width: 768px) {
    .title-card h1 {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .details-content {
        margin: 1rem;
    }
}

/* Large screens - 3+ columns */
@media (min-width: 1200px) {
    body {
        zoom: 140%
    }
    .container {
        padding: 2rem 4rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 3rem;
    }
}

/* Medium screens - 2 columns */
@media (min-width: 768px) and (max-width: 1199px) {
    body {
        zoom: 100%
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Small screens - 1 column */
@media (max-width: 767px) {
    body {
        zoom: 90%
    }

    .container {
        padding: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .title-card h1 {
        font-size: 2rem;
    }
    
    .title-card p {
        font-size: 1rem;
    }
    
}

