/* Variables globales */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --background-color: #f8f4ff;
    --text-color: #333333;
    --light-gray: #f9f9f9;
    --border-color: #e0e0e0;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --overlay-bg: rgba(0, 0, 0, 0.8);
    --card-bg: var(--light-gray);
    --card-text: #666;
    --footer-bg: var(--light-gray);
    --nav-bg: white;
    --search-bg: white;
    --toggle-bg: #f1f1f1;
    --toggle-icon: #ffa41b;
    --font-heading: 'Kaushan Script', Georgia, serif;
    --font-body: 'Averia Sans Libre', sans-serif;
}

[data-theme="dark"] {
    --primary-color: #9f94ff; 
    --secondary-color: #b8b2ff;
    --background-color: #1a1a2e;
    --text-color: #f0f0f0;
    --light-gray: #2a2a3a;
    --border-color: #404055;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --card-bg: #2d2d42;
    --card-text: #dadada;
    --footer-bg: #2a2a3a;
    --nav-bg: #20202f;
    --search-bg: #2d2d42;
    --toggle-bg: #444460;
    --toggle-icon: #f1c40f;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f8f4ff 0%, #f0e6ff 50%, #ffedf3 100%);
    background-attachment: fixed;
    position: relative;
    
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
    font-weight: 300;
}

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

html, body {
    height: 100%;
    margin: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23a29bfe' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 70%, rgba(108, 92, 231, 0.07) 100%);
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 10;
    height: 35vh; 
    min-height: 280px; 
    max-height: 350px; 
    padding: 0;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 0;
}

.header-portrait {
    flex: 0 0 25%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-right: 5%;
    padding: 2% 0;
    position: relative;
}

.header-text {
    text-align: center;
    width: 100%;
    margin-top: 5%;
    padding: 0 5%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 5;
}

header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    margin-bottom: 0.3em;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

header .subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 300;
    line-height: 1.4;
    opacity: 0.95;
    letter-spacing: 0.02em;
}

.portrait-image {
    max-width: 90%;
    max-height: 55%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    object-fit: contain;
}

.header-slideshow {
    flex: 0 0 70%;
    height: 100%;
    position: relative;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: visible;
    opacity: 1;
    box-shadow: none;
    border-radius: 0;
}

.header-background {
    position: absolute;
    top: 0;
    right: 0; 
    width: 70%;
    height: 100%;
    z-index: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.header-background .background-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; 
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(100%); 
}

.header-background .background-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.header-background .background-slide.previous {
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    z-index: 1;
}

.header-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) brightness(0.6);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
    max-width: 100%;
    height: 100%;
    padding: 2% 0; 
}

.header-portrait {
    flex: 0 0 25%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-right: 5%;
    position: relative;
}

.portrait-image {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.header-text {
    text-align: center;
    width: 100%;
    margin-top: 4%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    padding: 0;
    position: relative;
    z-index: 5;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

header .subtitle {
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.4;
    opacity: 0.95;
}

.header-slideshow {
    flex: 0 0 70%;
    height: 80%; 
    position: relative;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: visible;
    opacity: 1;
    box-shadow: none;
    border-radius: 0;
}

.slideshow-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    overflow: hidden;
}

.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
}

.slideshow-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.slideshow-slide.previous {
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    z-index: 1;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: transparent;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
    }
    
    .header-portrait {
        margin-right: 0;
        margin-bottom: 15px;
        flex: none;
        width: 50%;
        justify-content: center;
    }
    
    .portrait-image {
        max-height: 140px;
    }
    
    .header-text {
        text-align: center;
        margin-bottom: 15px;
        flex: none;
        width: 100%;
        margin-right: 0;
        padding-left: 0;
    }
    
    .header-slideshow {
        flex: none;
        width: 100%;
        height: 180px;
        display: block;
        visibility: visible;
        opacity: 1;
    }
    
    .header-background {
        width: 100%;
        right: auto;
        left: 0;
    }
}

nav {
    background-color: var(--nav-bg);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
}

.menu li {
    margin: 0 5px;
}

.menu a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    font-family: var(--font-body);
    font-weight: 400;
}

.menu a:hover, .menu a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.portfolio-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.portfolio-info {
    padding: 20px;
}

.portfolio-info h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.portfolio-category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 10px;
    margin-right: 5px;
}

.portfolio-category.main-category {
    background-color: var(--primary-color); 
    color: white;
    border: none;
}

.portfolio-category.secondary-category {
    background-color: #f8d7a4; 
    color: #7d5a38;  
    border: none;
}

.portfolio-description {
    color: var(--card-text);
    margin-bottom: 15px;
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding-right: 70px;
    width: 100%; 
    word-wrap: break-word; 
    hyphens: auto; 
}

.portfolio-description.expanded {
    -webkit-line-clamp: unset;
    max-height: none;
    background-color: var(--card-bg);
    padding: 10px;
    margin: -10px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
    width: calc(100% + 20px); 
}

.portfolio-description::after {
    content: "voir plus";
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 0 5px;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.8em;
    background: linear-gradient(to left, var(--card-bg) 70%, transparent);
    line-height: 1.6;
    z-index: 3;
}

.portfolio-description.expanded::after {
    content: "voir moins";
    position: relative;
    display: block;
    margin-top: 8px;
    text-align: right;
    background: none;
    font-size: 0.8em;
    padding-right: 5px;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.detail-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-theme-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.image-main-theme {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    padding: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.detail-view.active {
    display: flex;
    opacity: 1;
}

.detail-container {
    width: 90%;
    max-width: 1200px;
    background-color: transparent;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    max-height: 90vh;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1010;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.detail-content {
    display: flex;
    flex-direction: column;
    
    @media (min-width: 768px) {
        flex-direction: row;
        max-height: 80vh;
    }
}

.navigation-arrows {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.detail-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 80vh;
    width: 100%;
    height: 80vh;
    cursor: none;
    overflow: hidden;
    background-color: black;
}

#detail-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    transform-origin: center;
}

.zoomed {
    cursor: move !important;
}

.nav-arrow {
    font-size: 24px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1005;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

.detail-container .nav-arrow,
.detail-container .info-icon,
.detail-container .close-btn {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.detail-container.hide-controls .nav-arrow,
.detail-container.hide-controls .info-icon,
.detail-container.hide-controls .close-btn {
    opacity: 0;
}

.detail-container:hover .detail-image-container {
    cursor: default;
}

.detail-container.hide-controls .detail-image-container {
    cursor: none;
}

.detail-container.hide-controls:hover .detail-image-container {
    cursor: default;
}

.info-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1010;
}

.info-icon:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.info-tooltip {
    position: absolute;
    bottom: 45px;
    right: 0;
    width: 300px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1015;
    text-align: left;
}

.info-icon:hover .info-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.info-tooltip h2 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: white;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.info-tooltip .detail-category {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.info-tooltip p {
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
}

.detail-info {
    display: none;
}

@media (max-width: 768px) {
    .detail-content {
        flex-direction: column;
    }
    
    .detail-info {
        margin-top: 20px;
    }

    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .prev-arrow {
        left: 10px;
    }

    .next-arrow {
        right: 10px;
    }

    .info-tooltip {
        width: 250px;
        bottom: 45px;
        right: -100px;
    }
}

.home-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 50px 0;
}

.featured-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    height: 350px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.featured-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}

.featured-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.featured-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-item:hover .featured-image-container img {
    transform: scale(1.1);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    transition: all 0.3s ease;
}

.featured-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
    
    .featured-item {
        height: 250px;
    }
    
    .featured-overlay h2 {
        font-size: 1.5rem;
    }
}

footer {
    flex-shrink: 0; 
    background-color: var(--footer-bg);
    padding: 30px 0;
    text-align: center;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
}

.social-links {
    margin-top: 15px;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
    color: var(--text-color);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.search-container {
    margin: 30px 0;
    display: none;
}

.search-box {
    display: flex;
    margin-bottom: 15px;
    box-shadow: var(--box-shadow);
    border-radius: 50px;
    overflow: hidden;
}

#search-input {
    font-family: var(--font-body);
    flex: 1;
    padding: 15px 20px;
    font-size: 1rem;
    border: none;
    outline: none;
}

#search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: var(--transition);
}

#search-button:hover {
    background-color: var(--secondary-color);
}

.search-tags {
    font-family: var(--font-body);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.search-tag {
    background-color: var(--light-gray);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.search-tag:hover, .search-tag.active {
    background-color: var(--primary-color);
    color: white;
}

.search-tag.main-category {
    background-color: white;
    color: var(--text-color);
    border: 2px solid #ddd;
}

.search-tag.main-category:hover, .search-tag.main-category.active {
    background-color: var(--primary-color); 
    color: white;
    border-color: var(--secondary-color);  
}

.search-tag.secondary-category {
    background-color: white;
    color: var(--text-color);
    border: 2px solid #ddd;
}

.search-tag.secondary-category:hover, .search-tag.secondary-category.active {
    background-color: #f8d7a4;  
    border-color: #e8c794; 
    color: #7d5a38;  
}

.search-tag.main-category, 
.search-tag.secondary-category {
    background-color: white;
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

[data-theme="dark"] .search-tag.main-category,
[data-theme="dark"] .search-tag.secondary-category {
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.search-tag.main-category:hover, 
.search-tag.main-category.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
}

.search-tag.secondary-category:hover, 
.search-tag.secondary-category.active {
    background-color: #f8d7a4;
    border-color: #e8c794;
    color: #7d5a38;
}

[data-theme="dark"] .search-tag.main-category:hover,
[data-theme="dark"] .search-tag.main-category.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--secondary-color);
}

[data-theme="dark"] .search-tag.secondary-category:hover,
[data-theme="dark"] .search-tag.secondary-category.active {
    background-color: #c9a87b; 
    border-color: #b8996c;
    color: #ffffff; 
}

.no-results {
    text-align: center;
    padding: 50px 0;
    color: #666;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        align-items: center;
    }
    
    .menu li {
        width: 100%;
        text-align: center;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .search-box {
        flex-direction: column;
        border-radius: 10px;
    }
    
    #search-button {
        padding: 12px;
    }
    
    .search-tags {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    header {
        min-height: 25%;
        padding: 1rem 0;
    }
    
    .header-portrait {
        width: 40%;
    }
    
    .portrait-image {
        max-height: 100px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    header .subtitle {
        font-size: 0.8rem;
    }
    
    .header-slideshow {
        height: 120px;
    }
    
    nav {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .menu {
        padding: 0;
        margin: 0;
        max-height: 20vh;
        overflow-y: auto;
    }
    
    .menu li {
        margin: 0;
    }
    
    .menu a {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .portfolio-grid {
        gap: 15px;
        margin: 20px 0;
    }
    
    .portfolio-item img {
        height: 180px;
    }
    
    .portfolio-info {
        padding: 10px;
    }
    
    .portfolio-info h3 {
        font-size: 1rem;
    }
    
    .home-layout {
        gap: 15px;
        margin: 20px 0;
    }
    
    .featured-item {
        height: 180px;
    }
    
    .featured-overlay h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 359px) {
    header {
        min-height: 25%;
    }
    
    .header-portrait {
        width: 35%;
    }
    
    .portrait-image {
        max-height: 80px;
    }
    
    .menu {
        max-height: 20vh;
    }
    
    .menu a {
        padding: 8px 5px;
        font-size: 0.8rem;
    }
    
    .portfolio-item img {
        height: 150px;
    }
}

.hidden {
    display: none;
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.theme-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--toggle-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--toggle-icon);
    transition: all 0.3s ease;
}

[data-theme="dark"] body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    color: var(--text-color);
}

[data-theme="dark"] body::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23a29bfe' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

[data-theme="dark"] body::after {
    background: radial-gradient(ellipse at center, transparent 70%, rgba(108, 92, 231, 0.05) 100%);
}

[data-theme="dark"] #search-input {
    background-color: var(--search-bg);
    color: var(--text-color);
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.portfolio-info h3, 
.featured-overlay h2, 
.info-tooltip h2, 
#detail-title {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.02em;
}

.portfolio-description, 
.featured-description, 
.info-tooltip p,
#detail-description {
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
}