/* --- Base Setup --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
body { overflow-x: hidden; background-color: #111; }

/* --- Navigation --- */
header {
    position: fixed; top: 0; width: 100%; z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 2rem; max-width: 1200px; margin: 0 auto;
}
.logo { font-size: 1.25rem; font-weight: 700; color: #1a1a1a; text-decoration: none; letter-spacing: 1px;}

.nav-links { display: flex; list-style: none; gap: 1.5rem; }
.nav-links a { text-decoration: none; color: #333; font-weight: 500; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; transition: color 0.3s; }
.nav-links a:hover { color: #eb1000; }

/* Hamburger Menu */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 1001;}
.hamburger div { width: 28px; height: 2px; background-color: #333; transition: all 0.3s ease; transform-origin: 1px; }
.hamburger.toggle .line1 { transform: rotate(45deg); background-color: #eb1000; }
.hamburger.toggle .line2 { opacity: 0; }
.hamburger.toggle .line3 { transform: rotate(-45deg); background-color: #eb1000; }

/* --- Sections General --- */
section {
    min-height: 100vh;
    padding: 120px 2rem 6rem;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
}
.container { max-width: 1100px; width: 100%; }
h2 { font-size: 3rem; margin-bottom: 2rem; font-weight: 300; letter-spacing: 2px;}
p { font-size: 1.15rem; line-height: 1.8; margin-bottom: 1.5rem; }

/* --- Photo Galleries & Lightbox --- */
.section-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-top: 3rem; width: 100%; }
.gallery-2-col { grid-template-columns: 1fr 1fr; max-width: 800px; margin-left: auto; margin-right: auto;}

.gallery-img-wrapper { width: 100%; aspect-ratio: 3/2; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,0.1); position: relative; cursor: pointer; }
.gallery-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-img-wrapper:hover .gallery-img { transform: scale(1.05); }
.placeholder-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: rgba(255,255,255,0.4); font-style: italic; font-size: 0.9rem; text-align: center; width: 100%; pointer-events: none;}

/* Carousel Specifics */
.carousel-container { position: relative; width: 100%; margin-top: 3rem; display: flex; align-items: center; }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 1.5rem; padding-bottom: 1rem; scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth;}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { width: 320px; scroll-snap-align: start; flex: 0 0 auto; aspect-ratio: 3/2; border-radius: 6px; overflow: hidden; background: rgba(0,0,0,0.2); position: relative; cursor: pointer;}
/* Specific sizing for the YouTube video slides */
.video-slide { 
    aspect-ratio: 16/9; 
    min-width: 400px; /* Makes videos slightly wider than photos for better viewing */
    background: #000; 
}

/* Adjust mobile width for videos so they fit on phones */
@media (max-width: 768px) {
    .video-slide { min-width: 300px; }
}
.carousel-btn { background: rgba(0,0,0,0.5); color: white; border: none; font-size: 2rem; padding: 0.5rem 1rem; cursor: pointer; border-radius: 50%; position: absolute; z-index: 10; transition: background 0.3s;}
.carousel-btn:hover { background: rgba(115, 165, 198, 0.8); }
.btn-left { left: -20px; }
.btn-right { right: -20px; }

/* Lightbox Overlay */
#lightbox { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; }
#lightbox.active { display: flex; opacity: 1; }
#lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 4px; box-shadow: 0 0 30px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 30px; right: 40px; color: white; font-size: 3rem; cursor: pointer; font-weight: 300; }

/* --- Sections Specifics --- */
#personal { background-color: #fdfbf7; color: #4a4a4a; }
#personal h1 { font-size: 4rem; color: #2c2c2c; margin-bottom: 1rem; }
#personal .subtitle { font-size: 1.5rem; color: #7a7a7a; margin-bottom: 2rem; font-weight: 300; }
.personal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.hero-img-wrapper { aspect-ratio: 4/5; border-radius: 6px; overflow: hidden; background: #e0dcd3; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.1);}
.hero-img-wrapper .placeholder-text { color: #888;}

#professional { background-color: #1a1a24; color: #e2e2e2; }
#professional h2 { color: #ffffff; border-bottom: 2px solid #eb1000; display: inline-block; padding-bottom: 10px;}
.prof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem;}
.prof-card { background: rgba(255,255,255,0.03); padding: 2.5rem; border-left: 3px solid #eb1000; }
.prof-card h3 { color: #fff; font-size: 1.5rem; margin-bottom: 0.5rem; }
.prof-card h4 { color: #a0a0a0; font-weight: 400; margin-bottom: 1.5rem; font-size: 1rem; }

#clubs { background-color: #eef2ed; color: #2d4a22; }
#clubs h2 { color: #1e3615; border-bottom: 2px solid #558a3f; display: inline-block; padding-bottom: 10px;}
.club-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem;}
.club-card { background: #ffffff; padding: 3rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center; display: flex; flex-direction: column; justify-content: space-between;}

.club-logo { width: 120px; height: 120px; margin: 0 auto 0; border-radius: 12px; background: rgba(0,0,0,0.00); display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative;}
.club-logo img { width: 100%; height: 100%; object-fit: contain; }
.club-logo .placeholder-text { color: rgba(0,0,0,0.3); font-size: 0.8rem; }

.club-card h3 { font-size: 1.8rem; margin-bottom: 1rem; color: #1e3615; }
.club-card a { display: inline-block; margin-top: 1.5rem; color: #558a3f; text-decoration: none; font-weight: bold; border-bottom: 1px solid #558a3f; padding-bottom: 2px; align-self: center;}
#clubs .gallery-img-wrapper { background: rgba(0,0,0,0.05); }
#clubs .placeholder-text { color: rgba(0,0,0,0.3); }

/* --- 4. Hobbies & Travels (Redesigned: Cinematic & Puristic) --- */
#hobbies { background-color: #0f1720; color: #cbd5e1; } /* Deeper midnight slate */
#hobbies h2 { color: #ffffff; border-bottom: 2px solid #73a5c6; display: inline-block; padding-bottom: 10px; }

.hobbies-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; }

/* The new glass-like card style */
.hobby-item { 
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    padding: 2.5rem; 
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

/* Subtle hover effect */
.hobby-item:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.05);
    border-color: rgba(115, 165, 198, 0.3); /* Soft ice blue glow on the border */
}

#spiritual { background-color: #1e1b24; color: #dcd8e0; text-align: center; }
#spiritual h2 { color: #ffffff; letter-spacing: 4px; border-bottom: 1px solid #6c5b7b; display: inline-block; padding-bottom: 10px; margin-bottom: 3rem;}
.spiritual-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; text-align: left;}

/* --- Subtle Split Footer & Icons --- */
footer { background: #0a0a0a; color: #777; padding: 4rem 2rem 2rem; border-top: 1px solid #222;}
.footer-grid { display: flex; justify-content: space-between; max-width: 1000px; margin: 0 auto; flex-wrap: wrap; gap: 3rem;}
.footer-col { flex: 1; min-width: 250px;}
.footer-col.right { text-align: right; }
.footer-col h4 { color: #eee; font-weight: 500; font-size: 1rem; margin-bottom: 1.5rem; letter-spacing: 1px; text-transform: uppercase;}

.footer-link { display: flex; align-items: center; gap: 10px; color: #888; text-decoration: none; margin-bottom: 0.8rem; transition: color 0.3s; font-size: 0.95rem; }
.footer-link:hover { color: #fff; }
.footer-link svg { flex-shrink: 0; opacity: 0.7; transition: opacity 0.3s; }
.footer-link:hover svg { opacity: 1; }

.footer-col.right .footer-link { justify-content: flex-end; }

.footer-bottom { text-align: center; margin-top: 4rem; font-size: 0.8rem; opacity: 0.5; }

/* --- Quotes & Resources --- */
.testimonial {
    margin: 2.5rem 0; /* Breathes well above/below, flush on the sides */
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02); /* Very subtle, flat background */
    border-left: 1px solid; /* Thinner, more elegant line */
    border-radius: 4px; 
    font-style: italic;
    color: #b0b0b0; /* Softer text color */
    font-size: 0.95rem; /* Slightly smaller for that excerpt feel */
    line-height: 1.7;
}

.testimonial-adobe { border: none; }
.testimonial-spirit { border-left-color: #6c5b7b; }

.quote-author {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase; /* Gives it a polished, magazine-like credit */
}

.resource-links {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.resource-links strong {
    display: block;
    font-size: 0.85rem;
    color: #a0a0a0;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.resource-links a {
    display: block;
    color: #eb1000;
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.resource-links a:hover { color: #ff3333; }

/* --- Mobile Responsiveness (Optimized Layout & Typography) --- */
@media (max-width: 768px) {
    /* 1. Reclaim screen width: Reduce section padding left/right from 2rem to 1.25rem */
    section { padding: 100px 1.25rem 4rem; }
    
    /* 2. Scale down typography for mobile readability */
    #personal h1 { font-size: 2.5rem; }
    #personal .subtitle { font-size: 1.2rem; margin-bottom: 1.5rem; }
    h2 { font-size: 2rem; margin-bottom: 1.5rem; }
    p { font-size: 1.05rem; line-height: 1.6; margin-bottom: 1.2rem; }

    /* 3. Tighten the space between stacked grid items */
    .personal-grid, .prof-grid, .club-grid, .hobbies-grid, .spiritual-grid { 
        grid-template-columns: 1fr; 
        gap: 1.5rem; /* Reduced from 2rem/4rem */
    }
	
	/* --- Mobile Hero Layout: Heading -> Subtitle -> Image -> Text --- */
    .personal-grid {
        display: flex;
        flex-direction: column;
    }
    
    .personal-grid > div:first-child {
        display: contents; /* Unwraps the text box */
    }
    
    #personal h1 { 
        order: 1; 
        width: 100%; 
        text-align: center; 
        margin-bottom: 0; 
        line-height: 1.0; /* This shrinks the invisible bounding box around the huge text */
    }
    
    #personal .subtitle { 
        order: 2; 
        width: 100%;
        text-align: center; 
        margin-top: 0.2rem; /* We control the exact gap from the top now */
        margin-bottom: 0.0rem; 
    }
    
    .hero-img-wrapper { 
        order: 3; 
        width: 85%; 
        margin: 0 auto 1.0rem auto; /* Reduces space below the image */
    }
    
    #personal p:not(.subtitle) { 
        order: 4; 
        width: 100%; /* Ensures your paragraphs stay full width and readable */
    }

    /* 4. Reduce massive padding inside the cards */
    .prof-card, .hobby-item { padding: 1.5rem; }
    .club-card { padding: 2rem 1.5rem; } /* Keep a bit more vertical padding for club logos */
    
    /* 5. Adjust alignments and specific galleries */
    #spiritual { text-align: left; }
    .gallery-2-col { grid-template-columns: 1fr; }
    .carousel-btn { display: none; } /* Hide arrows, rely on natural swipe */
    
    /* 6. Tighten the Footer */
    footer { padding: 3rem 1.25rem 2rem; }
    .footer-grid { flex-direction: column; gap: 2rem; }
    .footer-col.right { text-align: left; }
    .footer-col.right .footer-link { justify-content: flex-start; }
    
    /* Mobile Nav (Unchanged) */
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; height: 100vh; width: 250px;
        background: #ffffff; flex-direction: column; padding: 100px 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: right 0.3s ease;
    }
    .nav-links.active { right: 0; }
}