/* LUCA PORTFOLIO - FINAL OPTIMIZED CSS
   Cleaned, Responsive, and Modern 
*/

:root {
    --bg-black: #050505;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-silver: #e0e0e0;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-black);
    color: white;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* --- Background Layers --- */
.background-glow, .background-image-container, .overlay-dark, .pearl-glow-layer {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}

.background-image-container {
    background-image: url('photos/Home.JPG');
    background-size: cover;
    background-position: center;
    z-index: -3;
}

.pearl-glow-layer {
    background: radial-gradient(circle at 10% 10%, rgba(147, 112, 219, 0.08), transparent 50%),
                radial-gradient(circle at 90% 10%, rgba(144, 238, 144, 0.05), transparent 50%);
    pointer-events: none;
}

/* --- Main Layout --- */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 30px 20px;
    text-align: center;
}

.profile-img-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(white, #888);
}

.profile-img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

h1 { font-weight: 300; letter-spacing: 4px; margin-bottom: 5px; }
.handle { color: var(--text-silver); font-size: 0.9em; margin-bottom: 15px; }
.bio { font-size: 0.85em; opacity: 0.7; line-height: 1.6; }

/* --- Interactive Elements (Buttons) --- */
.glass-button, .btn-primary, .secondary-btn {
    display: block;
    transition: all 0.3s ease;
    touch-action: manipulation;
    text-decoration: none;
    border-radius: 12px;
}

.glass-button {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 15px;
    margin: 12px 0;
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: white;
    color: black;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.secondary-btns-row { display: flex; gap: 10px; }
.secondary-btn {
    flex: 1;
    padding: 12px 8px;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-silver);
    font-size: 0.75em;
}

.glass-button:active, .btn-primary:active, .secondary-btn:active {
    transform: scale(0.98);
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow-y: auto;
}

.modal-content {
    margin: 60px auto 30px;
    width: 95%;
    max-width: 700px;
    padding-bottom: 50px;
}

.close-btn {
    position: fixed;
    top: 15px; right: 20px;
    color: white;
    font-size: 36px;
    z-index: 1001;
    cursor: pointer;
}

/* --- Gallery System (2-Column Grid) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
}

.gallery-item {
    width: 100%;
    height: 220px; /* Fixed height for thumb consistency */
    overflow: hidden;
    border-radius: 8px;
    background: #111;
    border: 1px solid var(--glass-border);
}

.gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    cursor: pointer;
}

/* --- Portfolio Style (Horizontal Scroll) --- */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch; /* iOS Smooth Scroll */
    scroll-snap-type: x mandatory; /* Snap effect for iPhone */
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.high-item {
    width: 280px; /* Fixed width for iPhone alignment */
    height: 400px; /* Fixed height for iPhone alignment */
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    scroll-snap-align: start;
    position: relative;
}

.high-item img {
    width: 100% !important; 
    height: 100% !important;
    object-fit: cover !important;
}

/* --- Fullscreen Zoom Logic --- */
.medium-zoom-overlay {
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 5000;
}

.medium-zoom-image--opened {
    z-index: 5001;
    border-radius: 10px;
}

.fullscreen-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.fullscreen-overlay.active { display: flex; }
.fullscreen-overlay img { max-width: 90%; max-height: 90%; object-fit: contain; }

/* --- Responsive Fixes --- */
@media screen and (max-width: 480px) {
    .container { padding: 25px 15px; }
    .gallery-grid { gap: 6px; padding: 5px; }
    
    .gallery-item {
        height: 180px; /* Adjusted height for small screens */
    }

    /* Portfolio Fix for Mobile */
    .high-item { 
        width: 240px; 
        height: 350px; 
    }
    
    .high-item img, .gallery-item img {
        max-width: 100%;
        min-height: 100%;
    }

    .secondary-btns-row { flex-direction: column; }
    .stat-item { min-width: 45%; }
}

/* --- Clean Up Stats & Tags --- */
.stats-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 20px; border-radius: 15px;
    margin-bottom: 30px; text-align: left;
}
.stats-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; }
.stat-item span { display: block; font-size: 0.6em; color: #888; text-transform: uppercase; }
.stat-item strong { font-size: 1.1em; font-weight: 300; }
.tags span {
    display: inline-block; padding: 5px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px; font-size: 0.7em;
    margin: 0 8px 8px 0; text-transform: uppercase;
}