/* --- 1. VARIABLES (Luxury Corporate Theme) --- */
:root {
    /* Color Palette: Cream, Dark Navy, Metallic Bronze */
    --bg-body: #f4f1ea;       /* Cream/Off-White */
    --bg-alt: #ebe7de;        /* Slightly darker Beige/Grey */
    
    --text-dark: #0e1624;     /* Deep Navy Blue */
    --text-medium: #555555;   /* Neutral Grey */
    
    --accent-bronze: #a47857; /* Metallic Satin Bronze */
    --accent-hover: #b6835c;  
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --container-narrow: 800px;
}

/* --- 2. RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg-body);
    color: var(--text-medium);
    font-family: var(--font-body);
    line-height: 1.8;
}

h1, h2, h3, h4 { color: var(--text-dark); font-family: var(--font-heading); }
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }

/* --- 3. UTILITIES --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 2rem; }
.bg-light-alt { background-color: var(--bg-alt); }
.section { padding: 6rem 0; }

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.section-header .line { width: 60px; height: 2px; background: var(--accent-bronze); margin: 0 auto; }

/* --- 4. HEADER --- */
header {
    position: fixed; top: 0; width: 100%; z-index: 999;
    background: rgba(244, 241, 234, 0.95);
    border-bottom: 1px solid rgba(197, 160, 89, 0.15);
    backdrop-filter: blur(10px);
    transition: 0.3s;
}
.header-container {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 5%; max-width: 1600px; margin: 0 auto;
}

/* Logo Styles */
.logo-link { display: flex; align-items: center; } /* Keeps the logo aligned */
.logo { height: 50px; width: auto; transition: transform 0.3s ease; }
.logo-link:hover .logo { transform: scale(1.05); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px;
    color: var(--text-dark); font-weight: 700;
}
.nav-links a:hover { color: var(--accent-bronze); }

/* --- 5. HERO --- */
.hero {
    height: 90vh; display: flex; align-items: center; justify-content: center;
    text-align: center; background: var(--bg-body);
}
.hero-subtitle {
    text-transform: uppercase; letter-spacing: 4px; font-size: 0.85rem;
    color: var(--accent-bronze); margin-bottom: 1rem; font-weight: 700;
}
.hero h1 { font-size: clamp(3rem, 5vw, 5rem); margin-bottom: 1.5rem; line-height: 1.1; color: var(--text-dark); }
.hero-line { width: 40px; height: 1px; background: var(--text-dark); margin: 0 auto 1.5rem; }
.hero-desc { font-size: 1.1rem; color: var(--text-medium); font-weight: 400; }

/* --- 6. BIO SECTION --- */
.bio-grid { display: grid; gap: 3rem; }
.bio-text-column { text-align: left; }
.bio-text-column h3 { margin-bottom: 1.5rem; font-size: 1.5rem; color: var(--accent-bronze); }

.bio-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 2rem;
    margin-top: 2rem;
}
.stat-item { text-align: center; }
.stat-label { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.stat-value { display: block; font-family: var(--font-heading); font-weight: 700; color: var(--text-dark); }

/* --- 7. TIMELINE LAYOUT --- */
.timeline-wrapper {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 4rem;
    align-items: start;
}
.col-title { 
    font-size: 1.25rem; margin-bottom: 2rem; 
    border-bottom: 1px solid var(--accent-bronze); 
    padding-bottom: 0.5rem; display: inline-block;
}

.timeline-item {
    padding-left: 2rem; border-left: 2px solid rgba(197, 160, 89, 0.3);
    position: relative; margin-bottom: 2.5rem;
}
.timeline-item::before {
    content: ''; position: absolute; left: -6px; top: 5px;
    width: 10px; height: 10px; background: var(--accent-bronze);
    border-radius: 50%;
}
.year { font-size: 0.8rem; font-weight: 700; color: var(--accent-bronze); margin-bottom: 0.2rem; }
.role { font-family: var(--font-heading); font-size: 1.1rem; color: var(--text-dark); font-weight: 700; }
.company { font-style: italic; font-size: 0.9rem; margin-bottom: 0.5rem; }

/* Cert Cards */
.cert-intro { font-size: 0.9rem; margin-bottom: 2rem; font-style: italic; opacity: 0.7; }
.cert-grid { display: grid; gap: 1.5rem; }

.cert-card {
    background: #fff; border: 1px solid rgba(197, 160, 89, 0.2); padding: 2rem;
    cursor: pointer; transition: all 0.3s ease;
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.cert-card:hover {
    transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-color: var(--accent-bronze); background: #faf9f6;
}
.cert-icon {
    font-family: var(--font-heading); color: rgba(197, 160, 89, 0.2);
    font-size: 1.5rem; margin-bottom: 0.5rem;
}
.cert-card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.cert-line { width: 30px; height: 1px; background: var(--accent-bronze); margin: 0.8rem 0; opacity: 0.5; }
.cert-link { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-bronze); font-weight: 700; }

/* --- 8. MANIFESTO / ETHOS --- */
.manifesto-container { max-width: 800px; margin: 0 auto; text-align: left; }
.lead-text { font-size: 1.2rem; font-weight: 400; color: var(--text-dark); margin-bottom: 1.5rem; }
.manifesto-container h4 { margin-top: 2.5rem; margin-bottom: 1rem; color: var(--accent-bronze); font-size: 1.2rem; letter-spacing: 1px; }
.highlight-text {
    font-family: var(--font-heading); font-size: 1.3rem; color: var(--text-dark);
    margin: 2rem 0; padding-left: 1rem; border-left: 3px solid var(--accent-bronze);
    line-height: 1.4;
}

.ethos-list {
    list-style: none; margin: 1rem 0; padding-left: 1rem;
    border-left: 2px solid var(--accent-bronze);
}
.ethos-list li { margin-bottom: 0.5rem; color: var(--text-dark); font-weight: 500; }

/* --- 9. PURSUITS GALLERY --- */
.gallery-grid { 
    display: grid; 
    /* Changed minmax to 250px so 4 items might fit in one row on large screens */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 2rem; 
}

.gallery-item { 
    background: #fff; 
    padding: 1rem; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.03); 
}

/* Updated to handle both placeholders and real images with 3:4 ratio */
.placeholder-img, .gallery-item img {
    width: 100%;
    aspect-ratio: 3 / 4;  /* Sets the 3:4 Portrait Ratio */
    height: auto;         /* Removes the old fixed 250px height */
    object-fit: cover;    /* Ensures images don't stretch weirdly */
    display: flex; 
    align-items: center; 
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Keep the rest the same */
.placeholder-img {
    background-color: #e0dcd3; 
    color: rgba(0,0,0,0.3); 
    font-family: var(--font-heading); 
    font-size: 1.5rem;
}

.gallery-info h4 { font-size: 1rem; margin-bottom: 0.5rem; }
.gallery-info p { font-size: 0.9rem; }

/* --- 10. READ MORE FUNCTIONALITY --- */
.content-wrapper { position: relative; overflow: hidden; transition: max-height 0.8s ease-in-out; }
.content-wrapper.collapsed { max-height: 250px; }
.content-wrapper.collapsed::after {
    content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 100px;
    background: linear-gradient(transparent, var(--bg-body)); pointer-events: none;
}
.content-wrapper.expanded { max-height: 3000px; }

.read-more-btn {
    display: block; margin: 2rem auto 0; background: transparent;
    border: 1px solid var(--accent-bronze); color: var(--accent-bronze);
    padding: 0.8rem 2rem; font-family: var(--font-body); font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem;
    cursor: pointer; transition: all 0.3s ease;
}
.read-more-btn:hover { background: var(--accent-bronze); color: var(--bg-body); }

/* --- 11. FOOTER --- */
footer { background: var(--text-dark); color: var(--bg-body); text-align: center; padding: 5rem 1rem; }
.footer-logo { height: 40px; margin: 0 auto 2rem; filter: brightness(100); transition: transform 0.3s; }
.logo-link:hover .footer-logo { transform: scale(1.05); }

.contact-cta { opacity: 0.8; margin-bottom: 1rem; color: #d0d0d0; }
.email-link { font-family: var(--font-heading); font-size: 1.5rem; border-bottom: 1px solid var(--accent-bronze); color: var(--bg-body); }
.social-links { margin: 2rem 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; }
.separator { color: var(--accent-bronze); margin: 0 10px; }
.copyright { font-size: 0.7rem; opacity: 0.4; }

/* --- 12. MODAL & IMAGE STYLES --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(14, 22, 36, 0.9); backdrop-filter: blur(5px);
    z-index: 2000; display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
    background: var(--bg-body); padding: 3rem; max-width: 500px; width: 90%;
    border: 1px solid var(--accent-bronze); position: relative; text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); transform: translateY(20px); transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.close-modal {
    position: absolute; top: 15px; right: 20px; font-size: 2rem;
    color: var(--text-medium); cursor: pointer; line-height: 1;
}
.close-modal:hover { color: var(--accent-bronze); }
.modal-header h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.modal-header .line { width: 50px; height: 2px; background: var(--accent-bronze); margin: 0 auto 2rem; }

/* Modal List & Image */
.modal-list {
    list-style: none; text-align: left; margin-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.1); padding-top: 1.5rem;
    max-height: 60vh; overflow-y: auto; padding-right: 10px;
}
.modal-list::-webkit-scrollbar { width: 6px; }
.modal-list::-webkit-scrollbar-thumb { background-color: rgba(197, 160, 89, 0.5); border-radius: 3px; }

.modal-list li {
    padding: 1.5rem 0; border-bottom: 1px solid rgba(0,0,0,0.05);
    color: var(--text-dark); display: flex; flex-direction: column; gap: 1rem;
}

.cert-item-header { display: flex; justify-content: space-between; width: 100%; font-weight: 700; color: var(--text-dark); }
.cert-item-header span { color: var(--accent-bronze); }

.cert-display-img {
    width: 100%; height: auto; border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-radius: 4px;
    margin-top: 0.5rem; transition: transform 0.3s ease;
}
.cert-display-img:hover { transform: scale(1.02); }

/* --- 13. MOBILE NAV --- */
.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 2px; background-color: var(--text-dark); margin: 5px; transition: 0.3s; }
.mobile-nav {
    position: fixed; top: 70px; left: 0; width: 100%; background: var(--bg-body);
    display: none; flex-direction: column; align-items: center; padding: 2rem; gap: 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); z-index: 998;
}
.mobile-nav.active { display: flex; }
.mobile-nav a { font-family: var(--font-heading); font-size: 1.2rem; color: var(--text-dark); }

@media (max-width: 768px) {
    .timeline-wrapper { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .burger { display: block; margin-left: auto; }
    .hero h1 { font-size: 2.5rem; }
    .hero-subtitle { font-size: 0.75rem; letter-spacing: 2px; }
}