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

body {
    font-family: 'Roboto Mono', monospace;
    background: var(--color-background);
    color: var(--color-main-text);
    overflow-x: hidden;
}

/* Fullscreen Background with Photo and Overlay */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: blur(40px);
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.75) 50%, rgba(0,0,0,0.85) 100%);
    z-index: 1;
}

/* Noise texture overlay */
.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMDAiIGhlaWdodD0iMzAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIGJhc2VGcmVxdWVuY3k9Ii43NSIgc3RpdGNoVGlsZXM9InN0aXRjaCIgdHlwZT0iZnJhY3RhbE5vaXNlIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGQ9Ik0wIDBoMzAwdjMwMEgweiIgZmlsdGVyPSJ1cmwoI2EpIiBvcGFjaXR5PSIuMDUiLz48L3N2Zz4=');
    opacity: 0.4;
    z-index: 2;
    pointer-events: none;
}

/* Navigation - Top Left */
nav {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--color-sub-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover,
nav a.active {
    color: #ffffff;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: #ffffff;
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Main Content Container */
.content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 120px 60px 60px 60px;
}

/* Hero Title */
.hero-title {
    text-align: left;
    margin-bottom: 40px;
    padding-left: 0;
}

.hero-title h1 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 0px;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #fff;
}

.hero-title p {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-sub-text);
    font-weight: 400;
}

/* Thumbnail Grid */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: none;
}

.thumbnail-item {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.thumbnail-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s ease;
    opacity: 0.85;
}

.thumbnail-item:hover img {
    transform: scale(1);
    opacity: 1;
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail-item:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-title {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #fff;
}

/* Lightbox Gallery */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9997;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#overlay.show {
    display: block;
    opacity: 1;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lightbox.show {
    display: flex;
}

.lightbox .image {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
}

.lightbox .image img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox .info {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    padding: 15px 30px;
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
}

.close-lightbox {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-lightbox.show {
    display: flex;
}

.close-lightbox:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.close-lightbox::before,
.close-lightbox::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 1px;
    background: #fff;
}

.close-lightbox::before {
    transform: rotate(45deg);
}

.close-lightbox::after {
    transform: rotate(-45deg);
}

/* Project Detail Page */
.project-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.project-header {
    text-align: center;
    margin-bottom: 60px;
    padding-top: 80px;
}

.project-header h1 {
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 15px;
    color: #ffffff;
}

.project-header p {
    font-size: 14px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.6);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

.back-link {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
    color: var(--color-sub-text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    padding: 10px 20px;
    border: 1px solid var(--color-borders);
}

.back-link:hover {
    color: var(--color-main-text);
    border-color: var(--color-main-text);
    background: var(--color-transparency-soft);
}

/* Slideshow for project detail */
#slideshow {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.slides {
    position: relative;
    width: 100%;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slides img {
    max-width: 95%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* jQuery Cycle plugin positioning */
.slides img:first-child {
    position: relative !important;
    display: block !important;
}

.slides img:not(:first-child) {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.slideshow-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
    z-index: 100;
}

#prev, #next {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#prev:hover, #next:hover {
    background: rgba(255,255,255,0.1);
}

#prev::before {
    content: '‹';
    color: #fff;
    font-size: 24px;
}

#next::before {
    content: '›';
    color: #fff;
    font-size: 24px;
}

#bullets {
    display: flex;
    gap: 8px;
}

#bullets a {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    font-size: 0;
    text-indent: -9999px;
    overflow: hidden;
}

#bullets a:hover {
    background: rgba(255,255,255,0.6);
}

#bullets a.activeSlide {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* About Page */
.about-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-header h1 {
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 15px;
    color: #ffffff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.profile-image {
    text-align: center;
}

.profile-image img {
    max-width: 400px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.2);
}

.about-text {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.5px;
}

.contact-info {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--color-borders);
}

.contact-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--color-body-text);
}

.contact-label {
    min-width: 100px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-sub-text);
}

.contact-value a {
    color: var(--color-main-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-value a:hover {
    color: var(--color-sub-text);
}

/* Password Protection */
#enter-password {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(0,0,0,0.9);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 60px 40px;
    max-width: 400px;
    width: 90%;
}

#enter-password h1 {
    font-size: 20px;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#enter-password input {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

#enter-password input:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255,255,255,0.1);
}

#enter-password button {
    width: 100%;
    padding: 15px;
    background: #fff;
    border: none;
    color: #000;
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#enter-password button:hover {
    background: rgba(255,255,255,0.9);
}

#password-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9998;
}


/* Mobile Responsive */
@media (max-width: 768px) {
    nav {
        top: 16px;
        left: 16px;
        gap: 16px;
        flex-wrap: wrap;
        max-width: calc(100% - 32px);
    }

    nav a {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .content {
        padding: 70px 16px 40px 16px;
    }

    .thumbnail-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .hero-title {
        margin-bottom: 30px;
    }

    /* Slideshow page */
    .project-header {
        padding-top: 60px;
        margin-bottom: 40px;
    }

    .project-detail {
        padding: 20px 0;
    }

    .back-link {
        top: 16px;
        right: 16px;
        font-size: 10px;
        letter-spacing: 1.5px;
        padding: 8px 12px;
    }

    .slides {
        min-height: 40vh;
    }

    .slides img {
        max-height: 55vh;
        max-width: 100%;
    }

    .slideshow-nav {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        justify-content: center;
        margin-top: 20px;
        padding-bottom: 20px;
    }
}

@media (min-width: 769px) {
    .about-content {
        grid-template-columns: 1fr 1.5fr;
        align-items: start;
    }

    /* Large side arrows on desktop, centered with slideshow */
    #slideshow {
        position: relative;
    }

    #prev, #next {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 60px;
        height: 100px;
        background: rgba(0,0,0,0.25);
        z-index: 200;
    }

    #prev {
        left: -70px;
        border-radius: 4px 0 0 4px;
    }

    #next {
        right: -70px;
        border-radius: 0 4px 4px 0;
    }

    #prev:hover, #next:hover {
        background: rgba(0,0,0,0.5);
    }

    #prev::before {
        font-size: 42px;
    }

    #next::before {
        font-size: 42px;
    }

    /* Bullets only in nav on desktop */
    .slideshow-nav {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        justify-content: center;
        margin-top: 24px;
        padding-bottom: 40px;
    }
}
