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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    -webkit-text-size-adjust: 100%;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    padding: 40px 30px;
    border-right: 1px solid #e0e0e0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.logo-section {
    margin: 0;
    padding: 0;
}

.logo-section a {
    display: block;
    line-height: 0;
    margin: 0;
    padding: 0;
}

.logo {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    height: auto;
    margin-bottom: 20px;
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    display: block;
}

.name {
    font-size: 21.6px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-top: 0;
    margin-bottom: 20px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    line-height: 1.2;
}

.top-nav {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 0;
    margin-bottom: 50px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

.top-nav a {
    color: #888888;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s, color 0.2s;
}

.top-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    background-color: #000000;
    opacity: 0;
    transition: width 0.2s, height 0.2s, opacity 0.2s, left 0.2s;
}

.top-nav a:hover,
.top-nav a.active {
    color: #000000;
    padding-left: 15px;
}

.top-nav a.active {
    font-size: 13.3px;
}

.top-nav a:hover::before,
.top-nav a.active::before {
    width: 8px;
    height: 8px;
    opacity: 1;
    left: 0;
}

.projects-menu {
    margin: 0;
    padding: 0;
}

.projects-menu h2 {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin-top: 0;
    margin-bottom: 15px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    line-height: 1.2;
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.project-links a {
    color: #888888;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    transition: color 0.2s;
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s, color 0.2s;
}

.project-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    background-color: #000000;
    opacity: 0;
    transition: width 0.2s, height 0.2s, opacity 0.2s, left 0.2s;
}

.project-links a:hover,
.project-links a.active,
.project-links a.highlight {
    color: #000000;
    padding-left: 15px;
}

.project-links a:hover::before,
.project-links a.active::before,
.project-links a.highlight::before {
    width: 8px;
    height: 8px;
    opacity: 1;
    left: 0;
}

/* Main Content Styles */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 140px 80px 60px 80px;
    background-color: #f5f5f5;
    max-width: 1600px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 80px 7.5px;
}

.project-item a {
    text-decoration: none;
    color: inherit;
}

.project-thumbnail {
    width: 57.5%;
    aspect-ratio: 4/3;
    background-color: #ffffff;
    margin: 0 auto 8px auto;
    overflow: visible;
    filter: grayscale(100%);
    position: relative;
    transition: filter 0s;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 1s ease-in-out;
}

.project-item {
    position: relative;
    overflow: visible;
}

.project-item:hover {
    z-index: 10;
}

.project-item a:hover .project-thumbnail {
    filter: grayscale(0%);
}

.project-label {
    display: none;
    position: absolute;
    top: 50%;
    left: 4%;
    right: 4%;
    transform: translateY(-50%);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 3px 0;
    margin: 0;
    white-space: nowrap;
}

.project-item a:hover .project-label {
    display: block;
}

/* Cover animations */
@keyframes scale-130 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

@keyframes scale-120 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes scale-115 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

@keyframes scale-110 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes scale-125 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

.project-item:nth-child(1) .project-thumbnail {
    animation: scale-115 24s ease-in-out infinite;
}

.project-item:nth-child(2) .project-thumbnail {
    animation: scale-130 24s ease-in-out infinite;
}

.project-item:nth-child(3) .project-thumbnail {
    animation: scale-115 12s ease-in-out infinite;
}

.project-item:nth-child(4) .project-thumbnail {
    animation: scale-130 24s ease-in-out infinite;
}

.project-item:nth-child(5) .project-thumbnail {
    animation: scale-110 36s ease-in-out infinite;
}

.project-item:nth-child(6) .project-thumbnail {
    animation: scale-125 24s ease-in-out infinite;
}

.project-item:nth-child(7) .project-thumbnail {
    animation: scale-115 24s ease-in-out infinite;
}

.project-item:nth-child(8) .project-thumbnail {
    animation: scale-130 36s ease-in-out infinite;
}

.project-item:nth-child(9) .project-thumbnail {
    animation: scale-125 24s ease-in-out infinite;
}

.project-item:nth-child(10) .project-thumbnail {
    animation: scale-130 36s ease-in-out infinite;
}

.project-item:nth-child(11) .project-thumbnail {
    animation: scale-115 12s ease-in-out infinite;
}

.project-item:nth-child(12) .project-thumbnail {
    animation: scale-120 24s ease-in-out infinite;
}

.project-item:nth-child(13) .project-thumbnail {
    animation: scale-110 36s ease-in-out infinite;
}

.project-item:nth-child(14) .project-thumbnail {
    animation: scale-125 24s ease-in-out infinite;
}

.project-item:nth-child(15) .project-thumbnail {
    animation: scale-115 24s ease-in-out infinite;
}

.project-item:nth-child(16) .project-thumbnail {
    animation: scale-130 24s ease-in-out infinite;
}

.project-item:nth-child(17) .project-thumbnail {
    animation: scale-120 36s ease-in-out infinite;
}

.project-item:nth-child(18) .project-thumbnail {
    animation: scale-130 24s ease-in-out infinite;
}

.project-item:nth-child(19) .project-thumbnail {
    animation: scale-125 24s ease-in-out infinite;
}

.project-item:nth-child(20) .project-thumbnail {
    animation: scale-130 36s ease-in-out infinite;
}

.project-item:nth-child(21) .project-thumbnail {
    animation: scale-115 24s ease-in-out infinite;
}

/* Mobile Carousel Styles */
.mobile-carousel {
    display: none;
}

@media (max-width: 768px) {
    .mobile-carousel {
        display: block;
        position: relative;
        width: 100vw;
        height: auto;
        overflow: hidden;
        scroll-snap-align: start;
        padding: 15px 0;
        margin-bottom: 10px;
    }

    .carousel-track {
        display: flex;
        height: 45vh;
        transition: transform 0.8s ease-in-out;
        will-change: transform;
        width: fit-content;
        overflow: hidden;
        margin: 0 25vw;
        border-radius: 8px;
        position: relative;
        padding: 0;
        gap: 0;
        flex-wrap: nowrap;
    }

    .carousel-slide {
        flex: 0 0 50vw;
        width: 50vw;
        min-width: 50vw;
        max-width: 50vw;
        height: 100%;
        position: relative;
        overflow: hidden;
        margin: 0;
        padding: 0;
    }

    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        pointer-events: none;
        filter: grayscale(100%);
        opacity: 0.3;
        transition: filter 0.4s ease-in-out, opacity 0.4s ease-in-out;
    }

    .carousel-slide.active img {
        filter: grayscale(0%);
        opacity: 1;
    }

    .carousel-track.no-transition .carousel-slide img {
        transition: none !important;
    }

    .carousel-overlay {
        position: absolute;
        top: 15px;
        left: 0;
        right: 0;
        width: 100vw;
        height: 45vh;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        z-index: 101;
        pointer-events: none;
    }

    .carousel-category {
        background-color: rgba(0, 0, 0, 0.85);
        color: #ffffff;
        font-size: 13.6px;
        font-weight: 400;
        letter-spacing: 1.5px;
        text-transform: uppercase;
        padding: 2px 0;
        margin: 0;
        width: 100%;
    }

    .carousel-title {
        display: none;
    }

    .carousel-dots {
        display: none;
    }
}

/* Mobile Header Styles */
.mobile-header {
    display: none;
}

@media (max-width: 768px) {
    .mobile-header {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

.mobile-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 11px 20px;
    background-color: rgba(255, 255, 255, 1);
}

.mobile-logo-section {
    display: flex;
    align-items: center;
    gap: 0px;
    flex: 1;
}

.mobile-logo-section a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    line-height: 0;
}

.mobile-logo {
    width: 78px;
    height: auto;
    transform: translateY(-20%);
}

.mobile-name {
    font-size: clamp(12px, 5vw, 25px);
    font-weight: bold;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    line-height: 1;
    margin: 0;
    padding: 0 10px 0 2px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
}

.mobile-subtitle-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    margin-right: 10px;
}

.mobile-subtitle-line {
    font-size: 8px;
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.1;
    margin: 0;
    padding: 0;
    color: #000000;
    white-space: nowrap;
}

.mobile-name-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.mobile-header-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-header-icons a {
    display: flex;
    align-items: center;
    line-height: 0;
}

.mobile-contact-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
    display: block;
}

.mobile-menu-icon {
    width: 14px;
    height: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after,
.mobile-menu-icon span {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: #000000;
}

.mobile-menu-icon span {
    height: 1px;
}

.mobile-nav-wrapper {
    padding: 0 0 7px 20px;
}

.mobile-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: flex-start;
}

.mobile-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #888888;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    flex: 0 0 auto;
}

/* Items at start of row - extend background to left edge */
.mobile-nav a.row-start {
    margin-left: -20px;
    padding-left: 29px;
}

/* Items at end of row - extend background to right edge */
.mobile-nav a.row-end {
    flex: 1 1 auto;
    justify-content: flex-start;
}

.mobile-nav a::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    background-color: #000000;
    margin-right: 0;
    transition: all 0.2s ease;
}

.mobile-nav a.active {
    background-color: rgba(255, 255, 255, 1);
    color: #000000;
    font-weight: 600;
    font-size: 12.1px;
}

.mobile-nav a.active::before {
    width: 6.6px;
    height: 6.6px;
    margin-right: 4px;
}

/* Mobile Burger Menu */
.mobile-burger-menu {
    position: fixed;
    top: 0;
    right: -33.33vw;
    width: 33.33vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 2000;
    padding: 63px 20px 20px 20px;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-burger-menu.show {
    right: 0;
}

.mobile-burger-menu a {
    display: block;
    padding: 12px 25px 12px 0;
    color: #000000;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 450;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: opacity 0.2s ease, padding-left 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.mobile-burger-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    background-color: #000000;
    opacity: 0;
    transition: width 0.2s, height 0.2s, opacity 0.2s;
}

.mobile-burger-menu a:hover {
    opacity: 0.6;
}

.mobile-burger-menu a.active {
    font-weight: 500;
    padding-left: 20px;
}

.mobile-burger-menu a.active::before {
    width: 8px;
    height: 8px;
    opacity: 1;
}

.mobile-menu-divider {
    padding: 38.5px 25px 8px 0;
    color: #999999a3;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    cursor: pointer;
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Mobile Footer */
.mobile-footer {
    display: none;
}

@media (max-width: 768px) {
    .mobile-footer {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #ffffff;
        padding: 5px 0 12px 0;
        text-align: center;
        position: relative;
        height: auto;
        margin: 0;
        width: 100vw;
        scroll-snap-align: end;
    }

    .mobile-footer-line {
        display: none;
    }

    .mobile-instagram-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #000000;
        text-decoration: none;
        transition: opacity 0.3s ease;
        line-height: 0;
    }

    .mobile-instagram-link:hover {
        opacity: 0.7;
    }

    .instagram-icon {
        width: 40px;
        height: 40px;
        color: #000000;
        display: block;
        stroke-width: 1.5;
    }

    .instagram-icon rect,
    .instagram-icon circle:not(:last-child) {
        stroke-width: 1.5;
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .project-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }

    html {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        height: 100%;
    }

    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        min-height: 100vh;
    }

    body.home-page {
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
    }

    .mobile-carousels-container {
        width: 100vw;
        height: auto;
        margin: 0;
        padding: 126px 0 0 0;
    }

    body.home-page .container {
        display: none !important;
        margin: 0;
        padding: 0;
        height: 0;
        overflow: hidden;
    }

    body:not(.home-page) .container {
        margin: 0;
        padding: 0;
    }

    /* Hide main-content only on home page (index.html) */
    body.home-page .main-content {
        display: none !important;
    }

    /* Show main-content on other pages with proper spacing */
    body:not(.home-page) .main-content {
        display: block !important;
        margin-left: 0;
        margin-top: 120px; /* Space for fixed header */
        padding: 20px;
    }

    .project-thumbnail {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }

    .mobile-carousels-container {
        display: none !important;
    }

    .mobile-carousel {
        display: none !important;
    }
}

/* Image Protection - Prevent casual copying */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: auto;
}

.project-thumbnail img,
.gallery-image-wrapper img,
.gallery-image-wrapper video {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* Contact Page Styles */
.contact-info {
    margin: 30px 0 50px 0;
}

.contact-item {
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
}

.contact-item strong {
    color: #999999b5;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-item a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #1a1a1a;
}

.contact-form-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 40px 0 30px 0;
    color: #999999b5;
}

.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #ffffff;
    opacity: 1;
}

.form-group input::-webkit-input-placeholder,
.form-group textarea::-webkit-input-placeholder {
    color: #ffffff;
    opacity: 1;
}

.form-group input::-moz-placeholder,
.form-group textarea::-moz-placeholder {
    color: #ffffff;
    opacity: 1;
}

.submit-button {
    padding: 12px 40px;
    background-color: #ffffff;
    color: #000000;
    border: none;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #e0e0e0;
}

/* Contact Form Mobile Styles */
@media (max-width: 768px) {
    /* Style labels like burger menu PROJECTS */
    .contact-item strong,
    .contact-form-title {
        font-size: 11px;
        font-weight: bold;
        letter-spacing: 0.5px;
        color: #999999a3;
    }

    /* Make input text 50% transparent and 10% smaller */
    .form-group input,
    .form-group textarea {
        font-size: 12.6px;
        color: rgba(255, 255, 255, 0.5);
    }

    .form-group input::placeholder,
    .form-group textarea::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .form-group input::-webkit-input-placeholder,
    .form-group textarea::-webkit-input-placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .form-group input::-moz-placeholder,
    .form-group textarea::-moz-placeholder {
        color: rgba(255, 255, 255, 0.5);
    }
}
