/* General Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    background-color: #fdfdfd;
    color: #333;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.nav-links:hover{
    color: #e87a5d;
}

.site-wrapper {
    display: flex;
    flex: 1;
}

a {
    text-decoration: none;
    color: #333;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
}

/* Sidebar */
.sidebar {
    width: 250px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 10px;
    top: 10px;
    height: calc(100vh - 20px);
    background: linear-gradient(165deg, #fff 0%, #fef5f1 50%, #ffeee8 100%);
    z-index: 100;
    box-sizing: border-box;
    transition: all 0.3s ease;
    border-right: none;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(232, 122, 93, 0.15);
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
}

.main-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.logo a {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3em;
    font-weight: bold;
    letter-spacing: -2px;
    display: block;
    margin-bottom: 60px;
    text-align: center;
}

.logo-full-name, .logo-initials {
    display: none;
}

/* Homepage logo */
body:not(.sub-page) .logo-initials {
    display: block;
}

/* Sub-page logo - consistent sizing */
.sub-page .logo a {
    font-size: 2em;
    text-align: left;
    letter-spacing: normal;
}

.sub-page:not(.scrolled) .logo-full-name {
    display: block;
    font-weight: bold;
}

.sub-page.scrolled .logo-initials {
    display: block;
    font-size: 2em; /* Keep consistent size */
    text-align: left; /* Keep left aligned */
    letter-spacing: normal;
}

/* Remove scroll shadow effects on desktop - no empty rules */

.sub-page .sidebar {
    border-right: none;
    background: linear-gradient(165deg, #fff 0%, #fef5f1 50%, #ffeee8 100%);
}

.sub-page .sidebar.scrolled {
    border-right: none;
    background: linear-gradient(165deg, #fff 0%, #fef5f1 50%, #ffeee8 100%);
    box-shadow: 0 4px 25px rgba(232, 122, 93, 0.2);
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav li {
    margin-bottom: 20px;
    list-style: none;
    position: relative;
}

.main-nav a {
    font-size: 1.2em;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    position: relative;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    padding-left: 1.5rem;
}

.main-nav a::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #e87a5d;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.main-nav a:hover::before,
.main-nav a.active::before {
    opacity: 1;
    transform: translateX(0);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 1.5rem;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #e87a5d, #f4a590);
    transition: width 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.main-nav a:hover::after {
    width: calc(100% - 1.5rem);
}

.main-nav a:hover {
    transform: translateX(5px);
}

.main-nav a.active {
    color: #e87a5d;
    font-weight: 600;
}

/* Contact Info at bottom of navigation */
.contact-info {
    margin-top: auto;
    padding-top: 1.875rem;
    border-top: 1px solid #f5d5cc;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.email-link {
    display: none;
}

.social-icons {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    text-decoration: none;
    line-height: 1;
    position: relative;
}

.social-icon::before {
    display: none !important;
}

.social-icon::marker {
    display: none !important;
    content: none !important;
}

.social-icon::before {
    display: none !important;
}

.social-icon::marker {
    display: none !important;
    content: none !important;
}

.email-icon::before {
    content: 'angelica.ota48@gmail.com' !important;
    display: block !important;
    position: absolute;
    bottom: calc(100% + 0.625rem);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(51, 51, 51, 0.95);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.social-icon:hover {
    color: #e87a5d;
    transform: scale(1.15);
}

.social-icon i {
    display: block;
}

.social-icon:hover {
    color: #e87a5d;
    transform: translateY(-2px);
}

.social-icon::after {
    display: none;
}

.email-icon {
    list-style: none !important;
}

.email-icon::marker {
    display: none;
}

.email-icon:hover::before {
    opacity: 1;
}

.hamburger-menu {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: fixed; /* Changed to fixed */
    right: 40px; /* Adjusted position */
    top: 40px; /* Adjusted position */
    z-index: 1002; /* Ensure it's on top of everything */
    width: 40px;
    height: 40px;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu.active span {
    background-color: #333; /* Ensure it's visible on overlay */
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* Main Content */
.main-content {
    flex: 1;
    padding: 40px 50px;
    margin-left: 250px; /* Adjusted to match sidebar width */
    overflow: hidden; /* Prevents horizontal scrollbar from slider */
}

/* Hero Section */
#hero {
    text-align: center;
    padding: 60px 0 0 0;
    margin-bottom: 0;
    overflow: visible;
}

#hero h1 {
    font-size: 4.5em;
    margin: 0 0 15px 0;
    line-height: 1.1;
}

#hero h2 {
    font-size: 1.5em;
    color: #e87a5d;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: normal;
    opacity: 0.9;
}

/* Gallery Slider */
.gallery-slider {
    margin: 0;
    width: 100%;
    position: relative;
    background: transparent;
    overflow: visible;
    padding: 0;
}

.slider-content {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.gallery-slider .project-widget {
    position: relative;
    aspect-ratio: 16 / 9;
    min-height: 300px;
    max-height: 450px;
    height: 400px;
    background-color: #1a1a1a;
    border-radius: 14px;
    margin: 0 2px;
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transform: translateZ(0);
    will-change: transform;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Animated border effect */
.gallery-slider .project-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 14px;
    padding: 3px;
    background: linear-gradient(135deg, #e87a5d, #d86b4e, #e87a5d);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 3;
    pointer-events: none;
}

.gallery-slider .project-widget:hover::before {
    opacity: 1;
    animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        background: linear-gradient(135deg, #e87a5d, #d86b4e, #e87a5d);
    }
    50% {
        background: linear-gradient(135deg, #d86b4e, #e87a5d, #d86b4e);
    }
}

.gallery-slider .project-widget:hover {
    transform: translateY(-6px) translateZ(0);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.project-widget .project-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.6));
    color: white;
    padding: 18px 20px;
    transform: translateY(10px) translateZ(0);
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    backdrop-filter: blur(8px);
    box-shadow: 0 -8px 20px rgba(0,0,0,0.25);
    border-radius: 12px;
    opacity: 0;
}

.project-widget:hover .project-overlay {
    transform: translateY(0) translateZ(0);
    opacity: 1;
    box-shadow: 0 -10px 25px rgba(0,0,0,0.3);
}

.project-overlay h4 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    font-family: 'Cormorant Garamond', serif;
    font-weight: bold;
}

.project-overlay p {
    margin: 0 0 15px 0;
    font-size: 0.9em;
    line-height: 1.4;
    opacity: 0.9;
}

.project-overlay .explore-btn {
    background-color: #e87a5d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translateZ(0);
}

.project-overlay .explore-btn:hover {
    background-color: #d86b4e;
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
}

/* Legacy placeholder image support */
.gallery-slider .placeholder-image {
    height: 300px;
    background-color: #eee;
    border-radius: 12px;
    margin: 0 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-size: cover;
    background-position: center;
    width: 100%;
    box-sizing: border-box;
}

.gallery-slider .placeholder-image:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Slick Slider Customization */
.slick-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    opacity: 0;
    will-change: transform, opacity;
}

.gallery-slider:hover .slick-arrow {
    opacity: 1;
}

.slick-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.08) translateZ(0);
}

.slick-prev {
    left: 20px;
}

.slick-next {
    right: 20px;
}

.slick-prev:before, .slick-next:before {
    font-family: 'Material Icons';
    font-size: 36px;
    line-height: 1;
    color: white;
    opacity: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.slick-prev:before {
    content: 'chevron_left';
}

.slick-next:before {
    content: 'chevron_right';
}

/* Show arrows when focusing with keyboard or hovering anywhere on slider */
.slick-arrow:focus { opacity: 1; outline: none; }
.gallery-slider.slick-initialized:hover .slick-arrow { opacity: 1; }


/* About Section */
#about {
    max-width: 100%;
    margin: 80px auto;
    text-align: center;
}

#about h3 {
    font-size: 2em;
    margin-bottom: 20px;
}

#about p {
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* OLD Portfolio Section - Disabled for 3D Models rebuild */
/*
#portfolio {
    text-align: center;
    padding-bottom: 80px;
}

#portfolio h3 {
    font-size: 3em;
    margin-bottom: 30px;
}
*/

/* OLD Portfolio Item styles - Disabled for clean 3D Models rebuild */
/*
.portfolio-item {
    // Old styles commented out
}
*/

/* Center hero on mobile and reduce spacing */
@media (max-width: 768px) {
    #hero { text-align: center; margin-top: 10px; }
    #hero h2 { margin-top: 6px; }
}

/* Filter buttons: Responsive grid */
.filter-buttons { 
    display: flex; 
    gap: 14px; 
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 900px) { 
    .filter-buttons { 
        gap: 12px;
    }
    
    .filter-buttons button,
    .filter-buttons .filter-btn {
        padding: 10px 22px;
        font-size: 0.9em;
    }
}

@media (max-width: 640px) { 
    .filter-buttons { 
        gap: 10px;
    }
    
    .filter-buttons button,
    .filter-buttons .filter-btn {
        padding: 8px 18px;
        font-size: 0.85em;
    }
}

/* Make slick arrows appear when hovering a slide/card too */
.gallery-slider .project-widget:hover ~ .slick-prev,
.gallery-slider .project-widget:hover ~ .slick-next,
.gallery-slider .slick-list:hover ~ .slick-prev,
.gallery-slider .slick-list:hover ~ .slick-next { opacity: 1; }

.portfolio-item:hover .project-overlay {
    opacity: 1;
}

.portfolio-item .project-overlay h4 {
    margin: 0 0 12px 0;
    font-size: 1.5em;
    font-family: 'Cormorant Garamond', serif;
    font-weight: bold;
    color: white;
    line-height: 1.2;
}

.portfolio-item .project-overlay p {
    margin: 0 0 20px 0;
    font-size: 1em;
    line-height: 1.4;
    color: rgba(255,255,255,0.95);
    max-width: 280px;
}

.portfolio-item .project-overlay .explore-btn {
    background-color: #e87a5d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    display: inline-block;
}

.portfolio-item .project-overlay .explore-btn:hover {
    background-color: #d96a4c;
    transform: translateY(-2px);
}

/* Project Page Styles */
.project-header {
    margin-bottom: 40px;
}

.project-breadcrumb {
    font-size: 0.9em;
    margin-bottom: 20px;
    color: #666;
}

.project-breadcrumb a {
    color: #e87a5d;
    text-decoration: none;
}

.project-breadcrumb a:hover {
    text-decoration: underline;
}

.project-header h1 {
    font-size: 3em;
    margin: 20px 0;
    font-family: 'Cormorant Garamond', serif;
}

.project-meta {
    display: flex;
    gap: 30px;
    align-items: center;
    font-size: 0.9em;
    margin-bottom: 30px;
}

.project-meta .category {
    background-color: #e87a5d;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
}

.project-meta .year {
    color: #666;
    font-weight: 500;
}

.project-meta .tools span {
    background-color: #f5f5f5;
    padding: 3px 10px;
    border-radius: 15px;
    margin-right: 8px;
    font-size: 0.8em;
    color: #555;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.project-gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.project-gallery img:hover {
    transform: scale(1.02);
}

.project-description h3 {
    font-size: 1.8em;
    margin: 40px 0 20px 0;
    font-family: 'Cormorant Garamond', serif;
}

.project-description p {
    line-height: 1.8;
    margin-bottom: 25px;
}

.project-description ul {
    line-height: 1.8;
    padding-left: 20px;
}

.project-navigation {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.back-btn, .next-btn {
    padding: 12px 24px;
    border: 1px solid #e87a5d;
    border-radius: 25px;
    text-decoration: none;
    color: #e87a5d;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    max-width: 200px;
}

.back-btn:hover, .next-btn:hover {
    background-color: #e87a5d;
    color: white;
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    /* Portfolio Grid - adjust for mobile */
    .portfolio-grid-container {
        padding: 0 10px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    /* Portfolio items on mobile */
    .portfolio-item .project-image,
    .portfolio-item .placeholder-image {
        height: 240px;
    }
    
    /* Hide slider arrows on mobile */
    .slick-arrow {
        display: none !important;
    }

    /* Disable ALL hover effects on mobile to prevent leakage */
    .portfolio-item:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .portfolio-item:hover .project-overlay {
        opacity: 0;
    }
    
    /* Make overlay always visible on mobile with tap interaction */
    .portfolio-item .project-overlay {
        opacity: 0;
        background: rgba(0,0,0,0.7);
    }
    
    .portfolio-item:active .project-overlay {
        opacity: 1;
    }
    
    .nav-buttons {
        flex-direction: row;
        gap: 15px;
        justify-content: space-between;
    }

    .back-btn, .next-btn {
        flex: 1;
        max-width: none;
        padding: 15px 20px;
        font-size: 0.9em;
    }

    .back-btn {
        margin-right: 10px;
    }

    .next-btn {
        margin-left: 10px;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 50px;
    margin-left: 250px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    footer {
        margin-left: 0;
        padding: 20px;
    }
}

/* No Scroll Class */
.no-scroll {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .site-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 16px 20px;
        border-bottom: 1px solid #f5d5cc;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        height: auto;
        border-right: none;
        background: linear-gradient(165deg, #fff 0%, #fef5f1 50%, #ffeee8 100%) !important;
        z-index: 1001;
        /* Removed shadow transition */
    }

    .sidebar .logo { grid-column: 2; text-align: center; margin: 0; }

    .hamburger-menu { grid-column: 3; justify-self: end; display: block; }

    /* Remove shadow behavior on mobile - no empty rules needed */

    /* Fix mobile logo sizing */
    .logo a {
        font-size: 2em !important; /* Consistent size */
        margin-bottom: 0;
    }

    /* Ensure correct logo shows on mobile for sub-pages */
    .sub-page .logo-full-name {
        display: block;
        font-size: 1em; /* Normal size, not giant */
    }
    .sub-page .logo-initials,
    .sub-page.scrolled .logo-full-name {
        display: none;
    }
    .sub-page.scrolled .logo-initials {
        display: block;
        font-size: 1em; /* Keep consistent */
    }
     body:not(.sub-page) .logo-initials {
        font-size: 1em; /* Not giant */
    }

    /* Add padding to main content to account for fixed header */
    .main-content {
        margin-top: 80px;
    }

    .main-nav {
        display: none; /* Hide nav by default on tablet/mobile */
        position: fixed; /* Changed to fixed for fullscreen overlay */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.97); /* White overlay */
        backdrop-filter: blur(10px);
        box-shadow: none;
        z-index: 1000;
        display: flex; /* Use flexbox for centering */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s cubic-bezier(0.4, 0.0, 0.2, 1), 
                    visibility 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
        padding: 0 20px;
        overflow-y: auto;
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 0;
    }
    
    .main-nav li {
        margin-bottom: 35px; /* Increased spacing */
        opacity: 0;
        transform: translateY(20px);
        animation: slideInNav 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
    }
    
    .main-nav.active li:nth-child(1) { animation-delay: 0.1s; }
    .main-nav.active li:nth-child(2) { animation-delay: 0.15s; }
    .main-nav.active li:nth-child(3) { animation-delay: 0.2s; }
    .main-nav.active li:nth-child(4) { animation-delay: 0.25s; }
    
    @keyframes slideInNav {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .main-nav a {
        font-size: 1.8em; /* Reduced from 2.5em */
        font-weight: bold;
        color: #333;
        transition: color 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    }

    .main-nav a:hover {
        color: #e87a5d;
    }
    
    .main-nav a::after {
        display: none; /* Hide underline on mobile */
    }

    .contact-info {
        position: absolute;
        bottom: 2.5rem;
        left: 46.8%;
        transform: translateX(-50%);
        padding-top: 1.5625rem;
        border-top: 1px solid #e0e0e0;
        text-align: center;
        opacity: 0;
        width: 100%;
        max-width: 25rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .main-nav.active .contact-info {
        opacity: 1;
        animation: fadeIn 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
        animation-delay: 0.3s;
    }

    @keyframes fadeIn {
        to {
            opacity: 1;
        }
    }

    .email-link {
        display: none;
    }

    .social-icons {
        justify-content: center;
        gap: 2.5rem;
        align-items: center;
    }

    .social-icon {
        font-size: 2.5rem;
    }

    .email-icon::before {
        font-size: 0.625rem;
        bottom: calc(100% + 0.75rem);
        padding: 0.625rem 0.875rem;
    }

    .hamburger-menu {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        display: block; /* Show hamburger on tablet/mobile */
    }

    .main-content {
        border-left: none;
        margin-left: 0; /* Remove margin */
    }
}


@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    #hero {
        padding: 40px 0 0 0;
        margin-bottom: 0;
        overflow: visible; /* Prevent outline cutoff */
    }

    #hero h1 {
        font-size: 2.6em;
        line-height: 1.1;
        margin-bottom: 0; /* Remove gap between name and subtitle */
    }
    
    #hero h2 {
        margin-top: 5px; /* Minimal spacing for visual separation */
    }
    
    .gallery-slider .project-widget {
        height: 350px;
    }
    
    .slider-content {
        padding: 0 15px;
    }

    /* Show slider arrows on mobile but make them more touch-friendly */
    .slick-arrow { 
        display: block !important; 
        opacity: 1;
        width: 40px;
        height: 40px;
    }

    /* Project page mobile styles */
    .project-header h1 {
        font-size: 2.5em;
    }

    .project-meta {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .project-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    #hero {
        padding: 40px 0 0 0;
        margin-bottom: 0;
    }
    
    #hero h1 {
        font-size: 2.5em;
        margin-bottom: 10px;
    }

    #hero h2 {
        font-size: 1.2em;
        margin-bottom: 5px;
    }
    
    #portfolio h3 {
        font-size: 2.2em;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-item .project-image,
    .portfolio-item .placeholder-image {
        height: 220px;
    }
    
    .gallery-slider .project-widget {
        height: 300px;
    }
    
    .slider-content {
        padding: 0 10px;
        margin-bottom: 30px;
    }
    
    .main-content {
        padding: 30px 20px;
    }
}

/* New slider-content class styles */
.slider-content {
    max-width: 1200px; /* Increased for better homepage layout */
    margin: 0 auto 40px;
}

.content-block {
    max-width: 900px;
    margin: 0 auto;
}

/* ArtStation-like Project Detail Page */
.project-detail-page {
    padding: 40px 50px;
}

.project-detail-container {
    display: flex;
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
}

.project-media {
    flex: 3; /* Takes up more space */
    display: flex;
    flex-direction: column;
}

.main-project-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.project-gallery img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-gallery img:hover {
    transform: scale(1.05);
}

.project-info-sidebar {
    flex: 1; /* Takes up less space */
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    height: fit-content; /* So it doesn't stretch full height */
}

.project-info-sidebar h1 {
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 20px;
    font-family: 'Cormorant Garamond', serif;
}

.project-meta {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #555;
}

.meta-item {
    margin-bottom: 10px;
}

.project-description {
    line-height: 1.7;
}

#viewer-3d {
    width: 100%;
    height: 600px; /* Taller viewer */
    background-color: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    cursor: grab;
}

#viewer-3d:active {
    cursor: grabbing;
}

@media (max-width: 1024px) {
    .project-detail-container {
        flex-direction: column;
    }
    
    .project-info-sidebar {
        max-width: 100%;
    }
    
    #viewer-3d {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .project-detail-page {
        padding: 20px;
    }
    
    #viewer-3d {
        height: 300px;
    }
}

#3d-viewer:active {
    cursor: grabbing;
}

.main-project-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.project-gallery img {
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.project-gallery img:hover {
    transform: scale(1.05);
}

.project-info-sidebar {
    flex: 1; /* Takes up less space */
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    height: fit-content; /* So it doesn't stretch full height */
}

.project-info-sidebar h1 {
    font-size: 2.2em;
    margin-top: 0;
    margin-bottom: 20px;
}

.project-meta {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #555;
}

.meta-item {
    margin-bottom: 10px;
}

.project-description {
    line-height: 1.7;
}

@media (max-width: 1024px) {
    .project-detail-container {
        flex-direction: column;
    }
    .project-info-sidebar {
        max-width: 100%;
    }
}

/* Mobile: Ensure consistent project overlay title sizing */
@media (max-width: 768px) {
    .gallery-slider .project-widget .project-overlay h4 {
        font-size: 1.5em !important; /* Consistent mobile title size */
        margin: 0 0 10px 0;
        font-family: 'Cormorant Garamond', serif;
        font-weight: bold;
    }
    
    .gallery-slider .project-widget .project-overlay p {
        font-size: 0.9em !important;
        line-height: 1.4;
        margin: 0 0 12px 0;
    }
    
    .gallery-slider .project-widget .project-overlay .explore-btn {
        padding: 10px 20px !important;
        font-size: 0.85em !important;
    }
}
