/* ===================================
   Hero Section
   =================================== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    padding: 5rem 10%;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 4px;
    background: linear-gradient(180deg, 
        transparent, 
        var(--olive-accent), 
        var(--jupiter-glow), 
        var(--olive-accent), 
        transparent);
    transform: translateX(-50%);
}

.hero-text h1 {
    font-size: 4rem;
    color: var(--baltic-sea);
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-text p {
    font-size: 1rem;
    color: var(--text-medium);
    line-height: 1.9;
    margin-bottom: 1.2rem;
}

.first-word {
    font-size: 2rem;
    font-weight: 700;
    color: var(--lionheart);
    margin-right: 4px;
    line-height: 1.3;
}

.ongoing {
    font-size: 1rem;
    text-decoration: underline;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-image img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 2px;
    box-shadow: 8px 8px 0 var(--jupiter-glow);
    outline: 3px solid var(--olive-accent);
    outline-offset: 30px;
}

/* ===================================
   Projects Section
   =================================== */
.projects-section {
    padding: 5rem 10%;
    max-width: 100%;
    margin: 0 auto;
    background-color: var(--warm-beige);
    border-top: 6px solid var(--baltic-sea);
    border-bottom: 6px solid var(--baltic-sea);
}

.projects-section .section-header h2 {
    background-color: var(--warm-beige);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-tile {
    position: relative;
    height: 320px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 6px 6px 0 var(--olive-accent);
    transition: all 0.3s ease;
    border: 3px solid var(--baltic-sea);
}

.project-tile:hover {
    box-shadow: 12px 12px 0 var(--olive-accent);
}

.project-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--baltic-sea) 0%, var(--lionheart) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-tile:hover .project-overlay {
    opacity: 0.8;
}

.project-overlay h3 {
    color: var(--light-cream);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.project-overlay p {
    color: var(--woodstock-tan);
    font-size: 1.05rem;
    text-align: center;
    line-height: 1.7;
}

/* Scroll Animation */
.project-tile {
    opacity: 0;
    transform: translateY(75px);
    transition: all 0.8s ease;
}

.project-tile.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   Project Modal
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 74, 62, 0.92);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    max-width: 1400px;
    max-height: 85vh;
    margin: 5vh auto;
    background-color: var(--light-cream);
    border: 4px solid var(--baltic-sea);
    box-shadow: 12px 12px 0 var(--jupiter-glow);
    overflow-y: auto;
    animation: slideUp 0.4s ease;
    padding: 3rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background-color: var(--baltic-sea);
    color: var(--light-cream);
    border: 3px solid var(--olive-accent);
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    background-color: var(--lionheart);
    transform: rotate(90deg);
}

#modal-title {
    font-size: 2.5rem;
    color: var(--baltic-sea);
    margin-bottom: 1.5rem;
    font-weight: 700;
    padding-right: 3rem;
    border-bottom: 3px solid var(--jupiter-glow);
    padding-bottom: 1rem;
}

#modal-body {
    color: var(--text-dark);
    line-height: 1.8;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.modal-text h3 {
display: none;
}

.modal-text p {
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    color: var(--text-medium);
}

.modal-images {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-images img {
    width: 100%;
    height: auto;
    border: 3px solid var(--olive-accent);
    box-shadow: 4px 4px 0 var(--jupiter-glow);
    transition: transform 0.3s ease;
}

.modal-images video {
    width: 100%;
    height: auto;
    border: 3px solid var(--olive-accent);
    box-shadow: 4px 4px 0 var(--jupiter-glow);
    transition: transform 0.3s ease;
}

.modal-images video:hover {
    transform: scale(1.02);
}

.modal-images img:hover {
    transform: scale(1.02);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 3rem 5%;
    }

    .hero::before {
        display: none;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .projects-section {
        padding: 3rem 5%;
    }

    .modal-content {
        max-width: 90%;
        margin: 3vh auto;
        padding: 2rem;
    }

    #modal-title {
        font-size: 2rem;
    }

    #modal-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .project-tile {
        height: 280px;
    }

    .modal-content {
        padding: 1.5rem;
        max-height: 90vh;
    }

    #modal-title {
        font-size: 1.75rem;
    }

    .modal-text p {
        font-size: 1rem;
    }

    .modal-images {
        grid-template-columns: 1fr;
    }
}