/* --- GLOBAL VARIABLES --- */
:root {
    --bg-color: #ffffff;
    --text-color: #111;
    --gold: #d4af37;
    --light-gray: #f9f9f9;
}

/* --- RESET & FONTS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden; /* Prevent horizontal scroll on desktop */
}

/* --- SOCIAL SIDEBAR (DESKTOP) --- */
.social-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 100;
}

.social-item {
    text-decoration: none;
    color: #333;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-name {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}

.social-item:hover {
    color: var(--gold);
    transform: translateX(5px);
}

.social-item:hover .platform-name {
    opacity: 1;
    transform: translateX(0);
}

/* --- TOP NAVIGATION --- */
.top-nav {
    position: absolute;
    top: 0;
    right: 0;
    padding: 30px 50px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    z-index: 10;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-btn {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-btn:hover, .nav-btn.active {
    color: #000;
}

.nav-resume {
    text-decoration: none;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 8px 20px;
    border-radius: 5px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.nav-resume:hover {
    background: var(--gold);
    color: #fff;
}

/* --- HERO SECTION --- */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.profile-container {
    margin-bottom: 20px;
}

.main-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.bulky-name {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #000;
}

.tagline {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
    font-weight: 300;
}

.bio-text {
    max-width: 600px;
    line-height: 1.8;
    color: #444;
}

/* --- GENERAL SECTIONS --- */
section {
    padding: 80px 10%;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
}

/* --- EDUCATION GRID --- */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.edu-card {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid var(--gold);
    transition: transform 0.3s;
}

.edu-card:hover {
    transform: translateY(-5px);
}

.edu-card h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.score-badge {
    display: inline-block;
    background: #000;
    color: var(--gold);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin: 10px 0;
}

.visit-btn {
    display: inline-block;
    margin-top: 15px;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
}

.visit-btn:hover {
    color: var(--gold);
    border-color: var(--gold);
}

/* --- PROJECTS --- */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.project-box {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    text-align: center;
    transition: box-shadow 0.3s;
}

.project-box:hover {
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.project-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.btn-action {
    margin-top: 20px;
    padding: 10px 25px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-action:hover {
    background: var(--gold);
}

/* --- QUOTE & FOOTER --- */
.quote-section {
    background: #111;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
}

.quote-box {
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.quote-icon {
    color: var(--gold);
    font-size: 2rem;
    display: block;
    margin: 20px auto;
}

.quote-box p {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-socials p {
    color: #666;
    margin-bottom: 20px;
}

.footer-icons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.footer-icons a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.footer-icons a:hover {
    color: var(--gold);
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* --- MODALS --- */
/* --- MODALS --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9); 
    overflow-y: auto; /* FIX: Enables vertical scrolling when content overflows the screen height */
}

.modal-content {
    margin: 5% auto;
    padding: 20px;
    width: 80%;
    max-width: 900px;
    text-align: center;
}

.close-btn {
    color: #fff;
    float: right;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.gallery-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.gallery-grid img {
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border: 2px solid #333;
}

/* ------------------------------------------------ */
/* MOBILE RESPONSIVE LOGIC                          */
/* ------------------------------------------------ */

@media (max-width: 768px) {
    
    /* 1. Make Top Nav Scrollable (Like Instagram Stories) */
    .top-nav {
        justify-content: flex-start; 
        overflow-x: auto; 
        padding: 15px 20px;
        background: rgba(255,255,255,0.95);
    }

    .nav-links {
        gap: 15px;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap; /* Force single line */
        white-space: nowrap; /* Prevent text wrapping */
        padding-bottom: 5px;
    }

    /* Hide scrollbar for clean look */
    .nav-links::-webkit-scrollbar { display: none; }

    .nav-btn, .nav-resume {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    /* 2. Transform Sidebar into Bottom App Bar */
    .social-sidebar {
        flex-direction: row; /* Make horizontal */
        position: fixed;
        top: auto; 
        bottom: 0; /* Stick to bottom */
        left: 0;
        width: 100%;
        transform: none; 
        background: #fff;
        padding: 12px 0;
        justify-content: space-evenly; 
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1); 
        z-index: 2000;
        border-top: 1px solid #eee;
    }

    .social-item {
        font-size: 1.4rem; 
        padding: 5px;
    }

    /* Hide the text labels ("LinkedIn", "GitHub") on mobile */
    .platform-name {
        display: none !important; 
    }

    /* 3. Adjust Hero Text */
    .bulky-name { font-size: 2.5rem; }
    
    /* 4. Add "Safe Area" at bottom so content isn't hidden behind the bar */
    .hero-section { padding-bottom: 80px; }
    .projects-container { padding-bottom: 60px; }
    body { padding-bottom: 60px; }

    /* 5. Fluid Modal Layout Configuration for Mobile Views */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 10px;
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 15px;
    }

    .gallery-grid img {
        width: 100%;
        height: auto;          /* Reset fixed height to remove vertical squash */
        max-height: 250px;     /* Cap height limits on phone layouts */
        object-fit: contain;   /* Force entire image visibility with no cropping */
        background: #111;      /* Fill background spacing box neatly */
        border-radius: 6px;
    }
}
