/* Αρχείο: style.css */

/* --- ΒΑΣΙΚΕΣ ΡΥΘΜΙΣΕΙΣ & ΠΑΛΕΤΑ --- */
:root {
    --c-deep: #41436A;   
    --c-mauve: #984063;  
    --c-coral: #F64668;  
    --c-peach: #FE9677;  

    --bg-page: var(--c-deep);
    --text-main: #f4f4f0; 
    --text-muted: rgba(244, 244, 240, 0.5);
    
    --grain-opacity: 0.12;
}

body, html {
    margin: 0; padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-page); color: var(--text-main);
    overflow-x: hidden; scroll-behavior: smooth;
    transition: background-color 0.6s ease;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; text-align: left; }
p { text-align: left; line-height: 1.4; }

/* --- FEATURE 1: CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--c-mauve); border-radius: 10px; border: 2px solid var(--bg-page); }
::-webkit-scrollbar-thumb:hover { background: var(--c-coral); }

/* --- FEATURE 2: CUSTOM CURSOR --- */
@media (pointer: fine) {
    body, a, button, img { cursor: none !important; }
    .custom-cursor {
        position: fixed; top: 0; left: 0;
        width: 15px; height: 15px; background-color: #c3ef00;
        border-radius: 50%; pointer-events: none; z-index: 10000;
        transform: translate(-50%, -50%); mix-blend-mode: difference;
        transition: width 0.2s ease, height 0.2s ease;
    }
    .custom-cursor.hovering { width: 45px; height: 45px; background-color: #f70000; }
}
@media (pointer: coarse) { .custom-cursor { display: none; } }

/* --- FEATURE 3: LIGHTS OFF SWITCH --- */
.lights-toggle {
    position: fixed; top: 40px; right: 40px;
    background: transparent; border: none;
    color: var(--text-muted); font-family: inherit;
    font-size: 1.2rem; font-weight: 700; cursor: pointer;
    transition: color 0.3s; z-index: 100;
}
.lights-toggle:hover { color: var(--text-main); }
.lights-toggle.active { color: var(--c-peach); }

/* LIGHTS OFF MODE STYLES */
body.lights-off { background-color: #030305; }

body.lights-off .noise-bg,
body.lights-off .bg-blob-container,
body.lights-off .filter-section,
body.lights-off .profile-info,
body.lights-off .site-footer,
body.lights-off .tile-info,
body.lights-off .load-more-btn,
body.lights-off .tile[data-category="illustration"],
body.lights-off .tile[data-category="radio"] {
    opacity: 0.05; 
    pointer-events: none; 
}

body.lights-off .tile-image-wrapper { background-color: transparent; }
body.lights-off .profile-pic { filter: grayscale(0%); box-shadow: 0 0 40px rgba(0,0,0,0.8); }
body.lights-off .tile:hover { box-shadow: 0 20px 50px rgba(0,0,0,0.9); }

/* --- BACKGROUND NOISE & PARALLAX BLOBS --- */
.noise-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: var(--grain-opacity); pointer-events: none; z-index: 1;
    transition: opacity 0.6s ease;
}

.bg-blob-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2; pointer-events: none; transition: opacity 0.6s ease;
}

.bg-blob {
    position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%;
    filter: blur(100px); opacity: 0.3; animation: breathe 15s infinite alternate ease-in-out;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.bg-blob.blob-1 { background-color: var(--c-mauve); top: -10%; left: -10%; }
.bg-blob.blob-2 { background-color: var(--c-coral); bottom: -10%; right: -10%; animation-delay: -5s; }
.bg-blob.blob-3 { background-color: var(--c-peach); bottom: -10%; left: -10%; animation-delay: -2s; }

@keyframes breathe {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* --- ANIMATIONS ΕΜΦΑΝΙΣΗΣ --- */
@keyframes fadeUpScale {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-in { animation: fadeUpScale 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* --- UNIVERSAL CONTAINER WIDTHS (Responsive up to massive Mac/4K screens) --- */
.filter-section, 
.portfolio-container, 
.load-more-container, 
.contact-section, 
.site-footer {
    width: 92%; /* Gives a nice 4% breathing room on the edges */
    max-width: 2500px; /* Massively increased to handle Mac and 4K monitors */
    margin: 0 auto;
    position: relative; 
    z-index: 5;
}

/* --- FILTERS --- */
.filter-section { padding: 40px 0 20px 0; }
.filters { display: flex; gap: 30px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px;}
.filter-btn {
    background: transparent; border: none; padding: 0; margin: 0; 
    font-family: "Fascinate", system-ui; font-weight: 700; font-size: 2.5rem; letter-spacing: -0.04em;
    color: var(--text-muted); cursor: pointer; transition: 0.3s; text-transform: lowercase;
}
.filter-btn.active, .filter-btn:hover { color: var(--text-main); }
.filter-btn.active::after { content: " •"; color: var(--c-coral); }

.sub-filters { display: none; gap: 20px; flex-wrap: wrap; }
.sub-filters.show { display: flex; animation: fadeUpScale 0.4s ease forwards; }
.sub-filter-btn { 
    background: transparent; border: none; padding: 0; font-size: 1.2rem; font-weight: 400;
    color: var(--text-muted); cursor: pointer; transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1); text-transform: lowercase;
}
.sub-filter-btn:hover { color: var(--text-main); }
.sub-filter-btn.active { color: var(--c-coral); font-weight: 700; transform: translateX(5px); }
.sub-filter-btn.active::before { content: "› "; }

/* --- THE FLUID NATURAL FLEX GALLERY (NO CROP, NO STRETCH) --- */
.portfolio-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Anchors images to the left for a natural read */
    gap: 30px; /* Slightly larger gap to balance the larger screen real estate */
    padding: 0 0 40px 0; 
}

.tile {
    /* clamp(min-size, dynamic-viewport-size, max-size) */
    /* Increased the max height to 700px so they look huge and crisp on your Mac */
    height: clamp(250px, 45vh, 700px); 
    flex-grow: 0; 
    position: relative;
    border-radius: 4px;
    opacity: 0;
    display: flex;
    flex-direction: column;
    transition: opacity 0.6s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.tile:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.3); 
}

.tile.hidden { display: none; }

.tile-image-wrapper { 
    height: 100%; 
    width: fit-content; 
    background-color: transparent; 
    display: block;
    overflow: hidden; 
    border-radius: 4px;
    position: relative; 
    transition: background-color 0.6s ease;
}

.tile img { 
    height: 100%; 
    width: auto; 
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); 
}

.tile:hover img { 
    transform: scale(1.03); 
} 

/* Text Below Media */
.tile-info { 
    position: relative; 
    padding: 12px 0 0 0; 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    background: none; 
}

.tile-info h3 { 
    font-size: 1.5rem; 
    color: var(--text-main); 
    margin: 0; 
}

.tile-category { 
    font-size: 0.85rem; 
    font-weight: bold; 
    color: var(--c-peach); 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
}

/* --- FIX FOR RADIO IFRAME WRAPPER --- */
.tile[data-category="radio"] {
    width: 100%;
    max-width: 800px; 
    height: auto; /* Overrides the clamp() so the player isn't unnecessarily tall */
}

.tile[data-category="radio"] .tile-image-wrapper {
    width: 100%; 
    height: 180px; 
    background: transparent; 
}

.tile-image-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block; 
    border: none;
}

/* --- LOAD MORE BUTTON --- */
.load-more-container { text-align: left; padding: 0 0 40px 0; }
.load-more-btn {
    background: transparent; color: var(--text-main); border: 2px solid var(--c-coral); padding: 15px 40px;
    font-size: 1.2rem; font-family: inherit; font-weight: 700; letter-spacing: -0.02em; 
    cursor: pointer; border-radius: 50px;
}
.load-more-btn:hover { background: var(--c-coral); color: #fff; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(246, 70, 104, 0.2); }
.load-more-btn.hidden { display: none; }

/* --- CONTACT SECTION --- */
.contact-section { 
    padding: 20px 0 60px 0; 
    border-top: none; 
}

.profile-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 60px; align-items: center; }

.profile-image-wrapper { 
    position: relative; 
    width: 100%; 
    max-width: 350px; 
    aspect-ratio: 1; 
    margin: auto; 
    animation: floatProfile 6s ease-in-out infinite; 
}

@keyframes floatProfile {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.profile-pic {
    width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
    position: relative; z-index: 2; filter: grayscale(0%);
    transition: filter 0.6s ease, box-shadow 0.6s ease, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-pic:hover { 
    filter: grayscale(100%); 
    transform: scale(1.05) rotate(-3deg); 
    box-shadow: 0 20px 40px rgba(246, 70, 104, 0.4); 
}

.blob-contact {
    position: absolute; 
    top: -5%; 
    left: -5%; 
    width: 110%; 
    height: 110%;
    background: linear-gradient(45deg, var(--c-coral), var(--c-peach), var(--c-mauve));
    background-size: 200% 200%;
    z-index: 1; 
    filter: blur(20px); 
    opacity: 0.85;
    animation: morphingBlob 10s infinite ease-in-out alternate;
    
    /* FIX FOR SAFARI BLUR BOX ARTIFACT */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    will-change: transform, filter;
}

@keyframes morphingBlob {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; background-position: 0% 50%; }
    33% { border-radius: 70% 30% 50% 50% / 50% 70% 30% 50%; }
    66% { border-radius: 50% 50% 30% 70% / 70% 30% 70% 30%; background-position: 100% 50%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; background-position: 0% 50%; }
}

.profile-info h2 { 
    font-size: clamp(3rem, 5vw, 5rem); /* FLUID TEXT! Prevents explosion on 4k screens */
    letter-spacing: -0.05em; 
    margin-bottom: 20px; 
    color: var(--text-main); 
    line-height: 0.9; 
}
.profile-info h2 span { color: var(--c-peach); display: block; }

.profile-info .titles { font-size: 1.5rem; font-weight: 500; color: var(--c-coral); margin-bottom: 30px; letter-spacing: -0.02em; }
.profile-info .bio-short { font-size: 1.2rem; max-width: 600px; margin-bottom: 20px; color: rgba(255,255,255,0.7); }
.profile-info .contact-cta { font-size: 1.3rem; font-weight: 700; color: var(--c-peach); margin-bottom: 30px; letter-spacing: -0.01em; }

.social-links { display: flex; gap: 25px; flex-wrap: wrap; align-items: center; }
.social-btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2.2rem; color: var(--text-main); text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s, filter 0.3s;
}
.social-btn:hover { 
    color: var(--c-coral); 
    transform: translateY(-8px) scale(1.15) rotate(8deg); 
    filter: drop-shadow(0 10px 15px rgba(246, 70, 104, 0.5)); 
}
.social-btn.email-icon { color: var(--c-peach); font-size: 2.5rem; }
.social-btn.email-icon:hover { 
    color: var(--c-coral); 
    transform: translateY(-8px) scale(1.15) rotate(-8deg); 
    filter: drop-shadow(0 10px 15px rgba(254, 150, 119, 0.5));
}

/* --- MINIMAL FOOTER --- */
.site-footer {
    padding: 40px 0; display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); font-size: 1rem; 
    background: linear-gradient(to top, rgb(16 4 49 / 80%), transparent);
}
.back-to-top {
    background: transparent; border: none; padding: 0; color: var(--c-peach); font-family: inherit;
    font-size: 1.2rem; font-weight: 700; cursor: pointer; transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.back-to-top:hover { color: var(--c-coral); transform: translateY(-5px); }

/* --- LIGHTBOX CSS --- */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(3, 3, 5, 0.95);
    backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center;
    z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox img {
    max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5); transform: scale(0.95); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.active img { transform: scale(1); }
.lightbox-close {
    position: absolute; top: 30px; right: 40px; background: transparent; border: none;
    color: var(--text-main); font-size: 3rem; font-weight: 300; cursor: pointer; transition: color 0.3s, transform 0.3s;
}
.lightbox-close:hover { color: var(--c-coral); transform: scale(1.1); }

/* --- RESPONSIVE DESIGN FOR MOBILE --- */
@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; align-items: start; }
    .profile-image-wrapper { max-width: 250px; margin: 0; }
    .filter-btn { font-size: 1.8rem; }
    .social-btn { font-size: 2rem; }
    .site-footer { flex-direction: column; gap: 20px; text-align: center; }
    .lightbox-close { top: 15px; right: 20px; font-size: 2.5rem; }
    .lights-toggle { top: 20px; right: 20px; }
}

@media (max-width: 768px) {
    .tile {
        height: auto;
        width: 100%;
    }
    .tile-image-wrapper {
        height: auto; 
        width: 100%;
    }
    .tile img {
        width: 100%;
        height: auto;
    }
}