/* =========================================
   1. CUSTOM PROPERTIES (Gallery Dark)
   ========================================= */
:root {
    --bg-main: #0d0d0d;       
    --bg-light: #1a1a1a;      
    --bg-dark: #000000;       
    
    --primary-color: #ffffff; 
    --text-main: #cccccc;     
    --text-light: #888888;    
    
    --accent-color: #ffffff;  
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. BASE STYLES & LAYOUT
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400; /* Clean, highly readable body text */
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.bg-light { background-color: var(--bg-light); }
.bg-dark { background-color: var(--bg-dark); }
.text-center { text-align: center; }

.bg-dark h2, .bg-dark p, .bg-dark .email-fallback { color: #ffffff; }
.bg-dark .email-fallback a { color: #ffffff; }
.bg-dark .email-fallback a:hover { color: var(--text-light); }

/* =========================================
   3. TYPOGRAPHY (Inter Minimalist)
   ========================================= */
h1, h2, h3, .logo {
    font-family: 'Inter', sans-serif;
    font-weight: 800; /* Extra bold for maximum impact */
    letter-spacing: -1px; /* Tightly packed for a premium agency look */
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* =========================================
   4. BUTTONS & UI ELEMENTS
   ========================================= */
.btn, .nav-link, .filter-btn, .skill-tag, .portfolio-info span {
    font-family: 'Inter', sans-serif;
    font-weight: 600; /* Semi-bold for UI elements */
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #000000; 
}

.btn-primary:hover {
    background-color: #e6e6e6;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(255, 255, 255, 0.1);
}

.btn-outline {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #000000;
}

/* =========================================
   5. HEADER & NAVIGATION
   ========================================= */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 13, 13, 0.85); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    margin-bottom: 0;
}

.nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    box-shadow: 0 10px 15px rgba(0,0,0,0.5);
    transform: translateY(-150%);
    opacity: 0;
    transition: var(--transition);
    visibility: hidden;
}

.nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
}

.nav-link {
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-light);
}

.menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1001;
}

.hamburger, .hamburger::before, .hamburger::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    position: absolute;
    transition: var(--transition);
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.menu-toggle.active .hamburger { background: transparent; }
.menu-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.menu-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero {
    padding-top: 8rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--text-light); 
}

.hero-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* =========================================
   7. PORTFOLIO SECTION (Masonry Layout)
   ========================================= */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.filter-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--text-light);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark); 
    border-color: var(--primary-color);
}

/* --- THE MASONRY GRID --- */
.portfolio-grid {
    column-count: 1; /* Default mobile view */
    column-gap: 1.5rem;
    width: 100%;
}

.portfolio-item {
background: var(--bg-light);
   border: 2px solid rgba(255, 255, 255, 0.09); /* Thin, ghost line */
   border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
    break-inside: avoid;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; /* Added border-color to the transition */
}

.portfolio-item.hide {
    display: none;
}

.portfolio-item:hover {
   transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    
    /* OLD CSS rule */
    /* border-color: rgba(255, 255, 255, 1); */
    
    /* === NEW CSS rule (makes the thin line slightly more visible on hover) === */
    border-color: rgba(255, 255, 255, 0.15); /* Gentle glow on hover */
}

.portfolio-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.portfolio-img {
    width: 100%;
    height: auto; /* Lets image define height */
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	/* --- NEW: Blur Starting State --- */
    filter: blur(10px);
    opacity: 0.6;
    transition: filter 0.5s ease-out, opacity 0.5s ease-out;
}
.portfolio-img.loaded {
    filter: blur(0);
    opacity: 1;
}
.portfolio-info {
    padding: 1.2rem;
}

.portfolio-info h3 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
}

.portfolio-info span {
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.info-header h3 { margin-bottom: 0; }

.link-icon {
    font-size: 1.2rem;
    color: var(--text-light);
    transition: var(--transition);
    opacity: 0.5;
}

.portfolio-item.hover-link:hover .link-icon {
    color: var(--primary-color);
    opacity: 1;
    transform: translate(3px, -3px);
}

/* =========================================
   8. ABOUT SECTION
   ========================================= */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    text-align: center; 
}

.about-text { text-align: center; }

.section-subtitle {
    display: inline-block;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.about-text h2 {
    font-size: clamp(2rem, 3vw, 2.8rem);
    margin-bottom: 1.5rem;
}

.lead-text {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 1rem;
}

.about-image {
    width: 250px;
    height: 250px;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.image-backdrop {
    position: absolute;
    top: 20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    z-index: -1;
    transition: var(--transition);
}

.about-image:hover .image-backdrop {
    top: 10px;
    left: -10px;
}

.expertise-section { margin-top: 2.5rem; }

.expertise-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.skills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center; 
}

.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.skill-tag:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #000000;
    transform: translateY(-2px);
}

/* =========================================
   9. CONTACT SECTION & FOOTER
   ========================================= */
.contact-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.email-fallback {
    font-size: 1.1rem;
}

.email-fallback a {
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.4);
    text-underline-offset: 4px;
    transition: var(--transition);
    font-weight: 600;
}

.footer {
    text-align: center;
    padding: 2rem 0;
    background: var(--bg-dark);
    color: var(--text-light);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
/* =========================================
   10. FLOATING WHATSAPP (FontAwesome Update)
   ========================================= */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366; /* Official WhatsApp Green */
    color: #ffffff; /* Makes the icon white */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.3s ease;
    animation: pulse-glow 2s infinite; 
}

.floating-whatsapp i {
    font-size: 35px; /* Sizes the FontAwesome icon */
    line-height: 1;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    color: #ffffff; /* Keeps it white on hover */
    animation: none; 
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) {
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    .floating-whatsapp i { 
        font-size: 30px; 
    }
}
/* =========================================
   11. LIGHTBOX & SLIDESHOW
   ========================================= */
.portfolio-item:not(.hover-link) { cursor: zoom-in; }

.lightbox {
    display: none; 
    position: fixed;
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.8);
    object-fit: contain;
}
/* --- Lightbox Watermark Overlay --- */
.image-wrapper {
    position: relative;
    display: inline-block;
}

#lightbox-watermark {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.09); /* Dark semi-transparent box */
    color: rgba(0, 0, 0, 0.7); /* Soft white text */
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    pointer-events: none; /* Prevents the watermark from interfering with clicks */
    user-select: none; /* Stops people from highlighting the copyright text */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#lightbox-caption {
    color: #ffffff;
    margin-top: 15px;
    font-size: 1.2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s;
    line-height: 1;
}

.lightbox-close:hover { color: var(--text-light); }

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    user-select: none;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

/* =========================================
   12. MEDIA QUERIES (Masonry Layout)
   ========================================= */
@media (max-width: 768px) {
    .floating-whatsapp { bottom: 20px; right: 20px; width: 55px; height: 55px; }
    .floating-whatsapp svg { width: 30px; height: 30px; }
    
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 16px; }
}

@media (min-width: 768px) {
    .menu-toggle { display: none; }
    
    .nav {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
        padding: 0;
        width: auto;
        box-shadow: none;
        border: none;
    }
    
    .nav-list {
        flex-direction: row;
        gap: 2.5rem;
    }

    /* Change Masonry to 2 columns on tablets */
    .portfolio-grid { column-count: 2; }

    .about-content {
        flex-direction: row;
        text-align: left; 
        justify-content: space-between;
        align-items: center;
        gap: 5rem;
    }
    
    .about-text { flex: 1; text-align: left; }
    .skills-wrapper { justify-content: flex-start; }
}

@media (min-width: 1024px) {
    /* Change Masonry to 4 columns on desktops */
    .portfolio-grid { column-count: 4; }
}
/* =========================================
   13. SCROLL TO TOP BUTTON
   ========================================= */
#scrollToTopBtn {
    position: fixed;
    bottom: 110px; /* Sits just above the WhatsApp button */
    right: 35px;
    background-color: var(--bg-light);
    color: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

#scrollToTopBtn.show {
    opacity: 1;
    visibility: visible;
}

#scrollToTopBtn:hover {
    background-color: var(--primary-color);
    color: var(--bg-dark); /* Dark arrow on hover */
    transform: translateY(-5px);
}

#scrollToTopBtn svg {
    width: 24px;
    height: 24px;
}

/* Adjust position for mobile to match WhatsApp button spacing */
@media (max-width: 768px) {
    #scrollToTopBtn {
        bottom: 90px;
        right: 25px;
        width: 45px;
        height: 45px;
    }
}