/* =============================================
   Josh Warner Portfolio - Clean Modern Design
   Reduced spacing, full-width video, modal carousel
   ============================================= */

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

:root {
    --bg-dark: #000000;
    --bg-secondary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-muted: #666666;
    --accent-green: #00ff88;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== HEADER ==================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    pointer-events: none;
}

/* Header inner wrapper for 3-column layout: logo | nav | contact */
.header-left,
.header-center,
.header-right {
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.header-left {
    flex: 1;
}

.header-center {
    flex: 0 0 auto;
}

.header-right {
    flex: 1;
    justify-content: flex-end;
}

/* Contact button */
.contact-btn {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

.contact-btn:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.contact-btn.active {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.9);
}

.logo:hover {
    color: #ffffff;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
}

.logo:hover .logo-circle {
    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.5),
        0 0 25px rgba(255, 255, 255, 0.3);
}

.logo-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--bg-dark);
    transition: all 0.3s ease;
}

nav {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
}

nav a:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

nav a.active {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Full Width Video - Edge to Edge */
.hero-video {
    position: relative;
    width: 100vw;
    height: 70vh;
    margin-top: 0;
    overflow: hidden;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0) 30%,
        rgba(0, 0, 0, 0) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    pointer-events: none;
}

.hero-content {
    padding: 2.5rem 2.5rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-headline {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.15;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-headline strong {
    font-weight: 600;
}

.hero-subline {
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 24px;
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    transition: var(--transition);
}

.status-badge:hover {
    background: rgba(0, 255, 136, 0.12);
    border-color: rgba(0, 255, 136, 0.5);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow:
        0 0 8px var(--accent-green),
        0 0 16px rgba(0, 255, 136, 0.5);
    animation: pulse 2.5s ease-in-out infinite;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-primary);
    max-width: 480px;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-weight: 400;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hire-btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--text-primary);
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out 0.6s both;
    box-shadow:
        0 4px 16px rgba(255, 255, 255, 0.2),
        0 0 24px rgba(255, 255, 255, 0.15);
}

.hire-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(255, 255, 255, 0.3),
        0 0 36px rgba(255, 255, 255, 0.25),
        0 0 48px rgba(255, 255, 255, 0.2);
}

/* ==================== PORTFOLIO GRID ==================== */
.portfolio-grid {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.portfolio-item {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    aspect-ratio: 16/10;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow:
        0 24px 64px rgba(255, 255, 255, 0.08),
        0 0 40px rgba(255, 255, 255, 0.04);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    position: relative;
    background: var(--bg-secondary);
    overflow: hidden;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image::before {
    opacity: 1;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-tags {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.tag {
    padding: 0.4rem 0.875rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.tag.coming-soon {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

/* ==================== SKILLS SECTION ==================== */
.skills-section {
    max-width: 1400px;
    margin: 5rem auto;
    padding: 0 2.5rem;
}

.skills-intro {
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    max-width: 580px;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.hire-btn-inline {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--text-primary);
    color: var(--bg-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: var(--transition);
    margin-bottom: 2.5rem;
    box-shadow:
        0 4px 16px rgba(255, 255, 255, 0.2),
        0 0 24px rgba(255, 255, 255, 0.15);
}

.hire-btn-inline:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(255, 255, 255, 0.3),
        0 0 32px rgba(255, 255, 255, 0.2);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
}

.skill-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.skill-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.skill-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.skill-description {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ==================== FOOTER ==================== */
footer {
    background: var(--bg-secondary);
    padding: 2.5rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-section h4 {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.footer-section p,
.footer-section a {
    font-size: 0.9rem;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-weight: 400;
}

.footer-section a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    transform: translateX(2px);
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ==================== BEHANCE-STYLE PROJECT MODAL ==================== */
.project-modal .modal-container.project-container {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    border-radius: 0;
    overflow: hidden;
}

/* Sticky Header */
.project-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.project-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-header .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.project-header .modal-close {
    position: static;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.project-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Scrollable Content Container */
.project-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Project Info Section */
.project-info {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
}

.project-info .modal-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.8;
}

.project-info .modal-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-tags .tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Project Images - Vertical Stack (No gaps - appears as one continuous image) */
.project-images {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-image-item {
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    background: var(--bg-secondary);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInImage 0.6s ease forwards;
}

.project-image-item img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delays */
.project-image-item:nth-child(1) { animation-delay: 0.1s; }
.project-image-item:nth-child(2) { animation-delay: 0.2s; }
.project-image-item:nth-child(3) { animation-delay: 0.3s; }
.project-image-item:nth-child(4) { animation-delay: 0.4s; }
.project-image-item:nth-child(5) { animation-delay: 0.5s; }
.project-image-item:nth-child(6) { animation-delay: 0.6s; }
.project-image-item:nth-child(7) { animation-delay: 0.7s; }
.project-image-item:nth-child(8) { animation-delay: 0.8s; }

/* Scroll to top button */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--text-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 200;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Legacy Modal Content (for non-PDF modals) */
.modal-content {
    padding: 1.5rem 0;
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.modal-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 1rem;
    line-height: 1.7;
}

.modal-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow:
            0 0 8px var(--accent-green),
            0 0 16px rgba(0, 255, 136, 0.5);
    }
    50% {
        opacity: 0.6;
        box-shadow:
            0 0 12px var(--accent-green),
            0 0 24px rgba(0, 255, 136, 0.7);
    }
}

/* Body scroll lock when modal is open */
body.modal-open {
    overflow: hidden;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hero-headline,
    .hero-subline {
        font-size: 2.5rem;
    }

    .skills-intro {
        font-size: 1.5rem;
    }

    .hero-video {
        height: 50vh;
    }
}

@media (max-width: 768px) {
    header {
        padding: 1rem 1.25rem;
    }

    .header-left {
        flex: 0 0 auto;
    }

    .header-right {
        flex: 0 0 auto;
    }

    .contact-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    nav {
        gap: 0.15rem;
    }

    nav a {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .hero-video {
        height: 50vh;
        margin-top: 0;
    }

    .hero-content {
        padding: 2rem 1.25rem 3rem;
    }

    .hero-headline,
    .hero-subline {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .portfolio-grid,
    .skills-section {
        padding: 0 1.25rem;
    }

    .portfolio-grid {
        margin: 2rem auto;
    }

    .skills-section {
        margin: 3rem auto;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    footer {
        padding: 2rem 1.25rem;
        margin-top: 3rem;
    }

    /* Modal responsive */
    .modal-container {
        width: 95%;
    }

    .modal-close {
        top: -45px;
        width: 40px;
        height: 40px;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    /* Project modal responsive */
    .project-header {
        padding: 0.875rem 1.25rem;
    }

    .project-header .modal-title {
        font-size: 1rem;
    }

    .project-header .modal-close {
        width: 38px;
        height: 38px;
    }

    .project-info {
        padding: 2rem 1.25rem;
    }

    .project-info .modal-description {
        font-size: 1rem;
    }

    .project-images {
        padding: 0 1.25rem 3rem;
        gap: 0;
    }

    .project-image-item {
        border-radius: 0;
    }

    .scroll-top-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .hero-headline,
    .hero-subline {
        font-size: 1.75rem;
    }

    nav {
        gap: 0.1rem;
    }

    nav a {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }

    .contact-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }

    .logo-circle {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }

    .logo {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
    }

    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }
}