:root {
    --bg-color: #d8e4b2;
    --text-dark-green: #3c5340;
    --frame-color: #f0f3e9;
    --shadow-color: rgba(62, 101, 52, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Workbench", sans-serif;
    background-color: transparent;
    color: var(--text-dark-green);
    overflow-x: hidden;
}
/* --- Language Switcher Styles --- */

/* Basic style for the button (mobile first) */
.lang-switcher {
  /* Inherits most styles from .nav-icon */
  border: none;
  background: linear-gradient(45deg, #588157, var(--text-dark-green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  cursor: pointer;
  padding: 5px; /* Consistent padding for mobile dropdown */
  width: 100%; /* Make it full width inside dropdown */
  text-align: center;
}

/* Desktop styles (inside your existing media query) */
@media (min-width: 768px) {
    .lang-switcher {
        /* Override some inherited styles for desktop */
        color: var(--text-dark-green); /* Make it solid color */
        background: none; /* Remove the gradient text effect */
        -webkit-background-clip: initial;
        background-clip: initial;
        border: 2px solid var(--text-dark-green); /* Give it a border */
        font-weight: bold;
        transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
        padding: 0; /* Reset padding for consistent size */
        width: 40px; /* Same as other icons */
        height: 40px; /* Same as other icons */
    }

    .lang-switcher:hover {
        transform: scale(1.15); /* Keep the hover effect */
        background-color: var(--text-dark-green);
        color: var(--frame-color);
    }
}
.code-snippet-wrapper pre {
    white-space: pre-wrap;      /* Preserves formatting but wraps long lines */
    word-break: break-all;      /* Helps break long words/text without spaces */
}

/* ======================================= */
/*    Z-INDEX STACKING ORDER             */
/* ======================================= */

#particle-canvas { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    z-index: 1; 
    pointer-events: none; 
    background-color: var(--bg-color); 
}
#bloom-text-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 2; pointer-events: none; }
main.content { position: relative; z-index: 3;}
.site-frame { position: fixed; top: 5px; left: 5px; right: 5px; bottom: 5px; border: 8px solid var(--frame-color); border-radius: 20px; z-index: 5; pointer-events: none; }

/* ======================================= /
/    RESPONSIVE TOP NAVIGATION STYLES     /
/ ======================================= */
.top-nav { position: fixed; top: 20px; left: 20px; z-index: 100; }
.nav-links { display: none; position: absolute; top: 60px; left: 0; background-color: rgba(240, 243, 233, 0.7); backdrop-filter: blur(10px); border-radius: 15px; box-shadow: 0 5px 25px var(--shadow-color); padding: 15px 10px; opacity: 0; transform: translateY(-10px); transition: opacity 0.3s ease, transform 0.3s ease; }
.nav-links::-webkit-scrollbar { width: 0px; background: transparent; }
.top-nav.nav-open .nav-links { display: flex; flex-direction: column; gap: 15px; opacity: 1; transform: translateY(0); }
.burger-menu { width: 48px; height: 48px; background-color: rgba(240, 243, 233, 0.5); backdrop-filter: blur(8px); border-radius: 50%; border: none; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 12px; }
.burger-menu span { display: block; width: 24px; height: 3px; background-color: var(--text-dark-green); border-radius: 3px; transition: transform 0.3s ease, opacity 0.3s ease; }
.top-nav.nav-open .burger-menu span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.top-nav.nav-open .burger-menu span:nth-child(2) { opacity: 0; }
.top-nav.nav-open .burger-menu span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-icon { font-size: 1.5rem; font-weight: bold; text-decoration: none; text-align: center; padding: 5px; background: linear-gradient(45deg, #588157, var(--text-dark-green)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ======================================= */
/*    DESKTOP NAVIGATION (Centered Capsule) */
/* ======================================= */

@media (min-width: 768px) {
    /* Hide the burger menu button on desktop */
    .burger-menu { 
        display: none; 
    }

    /* Main Navigation Container */
    .top-nav {
        /* Positioning: Center horizontally */
        left: 50%; 
        transform: translateX(-50%); 
        
        /* Sizing and Layout */
        width: auto;              /* Fit content width */
        min-width: 350px;         /* Minimum width to look balanced */
        padding: 5px 20px;        /* Inner spacing */
        
        /* Flexbox for centering children */
        display: flex;
        justify-content: center;
        align-items: center;

        /* Visual Style: Glassmorphism Capsule */
        background-color: rgba(240, 243, 233, 0.4); 
        backdrop-filter: blur(10px);
        border-radius: 50px;      /* Pill shape */
    }

    /* Link Container (Reset mobile styles) */
    .nav-links { 
        display: flex; 
        flex-direction: row; 
        align-items: center; 
        gap: 10px;                /* Space between links */
        
        /* Reset positioning and effects from mobile view */
        position: static; 
        background: none; 
        backdrop-filter: none; 
        box-shadow: none; 
        border: none;
        padding: 0; 
        opacity: 1; 
        transform: none; 
    }

    /* Individual Link Styling */
    .nav-icon { 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        
        /* Size and Spacing */
        width: auto; 
        height: auto; 
        min-width: 40px; 
        padding: 6px 12px;
        
        /* Text and Shape */
        font-size: 1rem; 
        border-radius: 20px; 
        white-space: nowrap;      /* Prevent text wrapping */
        transition: all 0.3s ease; 
    }

    /* Hover Interaction */
    .nav-icon:hover { 
        transform: scale(1.05); 
    }
}
/* ================================== */
/*   MAIN CONTENT STYLES              */
/* ================================== */

section { width: 100%; max-width: 1000px; margin: 0 auto 150px auto; padding: 40px; text-align: center; }
h2 { font-family: "Workbench", sans-serif; font-size: 3rem; margin-bottom: 80px; letter-spacing: 0.2em;  word-break: break-word; text-align: center;}
h3 { font-size: 1.8rem; margin-bottom: 20px; }
header { height: 100vh; margin-bottom: 100px; }
#about-section, .podcast-container { background-color: rgba(215, 225, 191, 0.6); backdrop-filter: blur(6px); border-radius: 20px; padding: 40px; box-shadow: 0 10px 40px var(--shadow-color); }
#about-section .about-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; text-align: left; }
.about-image { flex: 0 0 250px; height: 250px; border-radius: 50%; position: relative; overflow: hidden; background-color: rgba(255,255,255,0.2); }

.static-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;   
    display: block;
}
.about-text { flex: 1 1 400px; min-width: 300px; }
.about-text h2, .podcast-text h3 { text-align: left; }
.about-text p, .podcast-text p { line-height: 1.7; margin-bottom: 15px; font-size: 1.1rem; }
.gallery-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 40px; }
.portfolio-container { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.anim-reveal { transition: clip-path 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); clip-path: inset(var(--inset-y, 25%) var(--inset-x, 25%) round 15px); box-shadow: 0 10px 40px var(--shadow-color); border-radius: 15px; }
.capture-canvas {
    position: absolute;
    pointer-events: none; /* Allows mouse to click/hover the item underneath */
    z-index: 4;
}
.gallery-item { width: 250px; height: 250px; position: relative; border-radius: 20px; box-shadow: 0 10px 40px var(--shadow-color); z-index:20; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.gallery-item span { position: absolute; bottom: 0; left: 0; width: 100%; padding: 12px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); color: white; text-align: center; font-size: 1.1rem; font-weight: bold; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); opacity: 0; transition: opacity 0.4s ease; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; z-index: 3; }
.gallery-item:hover { transform: scale(1.05); z-index: 10; }
.gallery-item:hover span { opacity: 1; }
#podcast-section { padding: 0; }
.podcast-container { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; text-align: left; }
.podcast-icon { flex: 0 0 180px; height: 180px; }
.podcast-icon img { width: 100%; height: 100%; border-radius: 20px; object-fit: cover; box-shadow: 0 5px 20px var(--shadow-color); }
.podcast-text { flex: 1 1 400px; }
.podcast-button { display: inline-block; background-color: var(--text-dark-green); color: var(--frame-color); padding: 12px 24px; border-radius: 30px; text-decoration: none; font-weight: bold; margin-top: 10px; transition: transform 0.2s ease, background-color 0.2s ease; }
.podcast-button:hover { transform: translateY(-3px); background-color: #4a7551; }
/* ========================================================================== */
/*    PORTFOLIO SECTION (Redesigned to match Podcast Style)                   */
/* ========================================================================== */

/* 1. Container Layout */
#portfolio-section {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    gap: 60px;              /* Space between each project card */
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 150px auto;
    padding: 20px;
}

/* 2. The Card Style (Mimics .podcast-container) */
.portfolio-card {
    display: flex;          /* Horizontal layout (Image Left, Text Right) */
    flex-wrap: wrap;        /* Wraps on smaller screens */
    align-items: center;    /* Vertically center content */
    gap: 40px;              /* Space between image and text */
    text-align: left;
    text-decoration: none;  /* Remove default link underline */
    color: var(--text-dark-green);
    
    /* Glassmorphism Effect (Same as Podcast/About) */
    background-color: rgba(215, 225, 191, 0.6);
    backdrop-filter: blur(6px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px var(--shadow-color);
    
    /* Animation properties */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;     /* Context for positioning elements */
    overflow: hidden;       /* Ensures content stays inside rounded corners */
}

/* Hover Effect */
.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(62, 101, 52, 0.25);
}

/* 3. Image Area */
.portfolio-img-container {
    flex: 0 0 250px;        /* Fixed width like the podcast icon */
    height: 250px;          /* Fixed height */
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.portfolio-img-container img,
.portfolio-img-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* Fills the square without stretching */
    transition: transform 0.5s ease;
}

/* Subtle zoom on image hover */
.portfolio-card:hover .portfolio-img-container img {
    transform: scale(1.05);
}

/* 4. Text Content Area */
.portfolio-text {
    flex: 1 1 300px;        /* Takes up remaining space, min-width 300px */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Title Style */
.portfolio-text h3 {
    font-family: 'Workbench', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-dark-green);
    line-height: 1.2;
}

/* Description Style */
.portfolio-text p {
    font-family: 'Inter', sans-serif; /* Clean font for reading */
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #4a5d4e;
}

/* 5. Tags (Tech Stack) */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.tech-tag {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 12px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.5); /* Subtle white background */
    border: 1px solid rgba(60, 83, 64, 0.2);
    color: var(--text-dark-green);
}

/* 6. "View Project" Arrow/Button (Optional visual cue) */
.view-project-link {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-dark-green);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto; /* Pushes to bottom if flex container stretches */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .portfolio-card {
        flex-direction: column; /* Stack image on top of text */
        text-align: center;
        padding: 30px 20px;
    }

    .portfolio-img-container {
        width: 100%;
        max-width: 300px; /* Limit image size on mobile */
        height: 200px;
        flex: none;
    }
    
    .portfolio-text {
        text-align: left; /* Keep text readable */
    }
    
    .portfolio-text h3 {
        text-align: center;
    }

    .tech-tags {
        justify-content: center;
    }
}
/* ================================== */
/*   UPDATED CONTACT SECTION          */
/* ================================== */

#contact-section {
    display: flex;
    flex-direction: column;
    align-items: center;     /* Centers items horizontally */
    justify-content: center; /* Centers items vertically */
    width: 100%;             
    max-width: 1000px;
    margin: 0 auto;          /* Centers the section container */
    padding-bottom: 120px;   /* Added padding to prevent icons from being cut off */
    position: relative;
    z-index: 10;
}

#contact-section p {
    text-align: center;      /* Forces text to be centered */
    width: 100%;
    max-width: 600px;        /* Keeps text line length readable */
    font-size: 1.2rem;
    margin-bottom: 40px;
    padding: 0 20px;         /* Prevents touching edges on mobile */
}

.contact-links {
    display: flex;
    justify-content: center; /* Centers the icons */
    align-items: center;
    gap: 30px;
    width: 100%;
}


.contact-icon { 
    display: inline-flex; 
    width: 50px;      
    height: 50px; 
    background-color: transparent; 
    border-radius: 0; 
    padding: 0; 
    transition: transform 0.3s ease, filter 0.3s ease; 
}


.contact-icon:hover { 
    transform: translateY(-5px) scale(1.1); 
    filter: drop-shadow(0 5px 5px rgba(62, 101, 52, 0.4));
}

.contact-icon svg { 
    width: 100%; 
    height: 100%; 
    fill: var(--text-dark-green); 
}

/* Updated shared styles (removed #contact-section from here to avoid conflicts) */
#portfolio-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.capture-canvas {
    position: absolute;
    pointer-events: none;
    z-index: 4;
}

/* ======================================= */
/*    MOBILE GALLERY ADAPTATION            */
/* ======================================= */

@media (max-width: 768px) {
    /* 1. Change grid to single column stack */
    .gallery-container {
        flex-direction: column; /* Stack vertically */
        align-items: center;    /* Center items */
        gap: 60px;              /* More space between items on mobile */
    }

    /* 2. Make gallery items responsive */
    .gallery-item {
        width: 80vw;           /* 80% of viewport width */
        height: 80vw;          /* Keep it square (aspect ratio 1:1) */
        max-width: 400px;      /* Prevent it from getting too huge on tablets */
        max-height: 400px;
        margin-bottom: 20px;
    }

    /* 3. Adjust text overlay size for mobile */
    .gallery-item span {
        font-size: 1.2rem;     /* Slightly larger text for readability */
        padding: 15px;
    }
}
/* ======================================= */
/*    MOBILE FIXES (AVATAR & GALLERY)      */
/* ======================================= */

@media (max-width: 768px) {
    .about-image {
        width: 200px !important;
        height: 200px !important;
        flex: 0 0 auto !important; 
        border-radius: 50% !important;
        overflow: hidden !important;
        margin: 0 auto 30px auto; 
    }
    
    .static-avatar-img {
        border-radius: 50% !important;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .gallery-item img {
        opacity: 1 !important; 
    }
    .gallery-item span {
        opacity: 1 !important; background: rgba(0,0,0,0.4);
    }
}
