/* =========================================
   GLOBAL.CSS - Variables, Resets, & Navbar
   ========================================= */

:root {
    --bg-color: #F9F9F6;      /* Peaceful Japanese paper off-white */
    --text-color: #1A1A1D;    /* Deep Charcoal */
    --accent-color: #D35400;  /* Bold Indian Saffron/Turmeric */
    --card-bg: #FFFFFF;       /* Pure white for cards */
    
    --font-heading: 'Noto Serif JP', serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
}

/* --- NAVIGATION BAR --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    background-color: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.logo a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.navbar .main-nav .nav-links {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    text-decoration: none !important;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--accent-color);
}


/* =========================================
   GLOBAL FOOTER
   ========================================= */

.site-footer {
    background-color: var(--text-color); /* Dark Charcoal */
    color: var(--bg-color); /* Off-white text */
    padding: 80px 10% 40px 10%;
    margin-top: 80px; /* Gives breathing room before the footer starts */
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #FFF;
}

.footer-brand p {
    color: #AAA;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    text-decoration: none;
    color: #CCC;
    transition: color 0.3s ease;
    font-size: 1.05rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #777;
    font-size: 0.9rem;
}

.fun-fact {
    color: var(--accent-color);
    font-style: italic;
}

.highlight {
    color: var(--accent-color);
}


/* =========================================
   MOBILE RESPONSIVENESS & HAMBURGER MENU 
========================================= */

/* Hamburger Default State (Hidden on Desktop) */
.hamburger {
    display: none;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    flex-direction: column;
    gap: 6px;
    z-index: 100; /* Stays above the sliding menu */
}

.hamburger .bar {
    width: 28px;
    height: 3px;
    background-color: var(--text-color, #111);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* --- TABLET & MOBILE VIEW (Max width: 768px) --- */
@media (max-width: 768px) {
    
    /* 1. Navbar & Hamburger Animation */
    .hamburger {
        display: flex; 
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Hides the menu completely off-screen */
        width: 50vw; /* Menu takes up 75% of screen width */
        height: 100vh;
        background-color: var(--bg-color, #ffffff);
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0); /* Smooth slide */
        z-index: 99;
    }

    /* When JS adds the .active class, the menu slides in */
    .main-nav.active {
        right: 0;
    }

    /* BULLETPROOF MOBILE OVERRIDE */
    header.navbar nav.main-nav ul.nav-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        height: auto !important;
        gap: 40px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    header.navbar nav.main-nav ul.nav-links li {
        display: flex !important;
        width: 100% !important;
        justify-content: flex-start  !important;
        margin: 0 !important;
    }
    
    header.navbar nav.main-nav ul.nav-links li a {
        display: inline-block !important;
        font-size: 1.2rem !important; /* Made it slightly larger for better mobile UX */
        width: 100% !important;
        text-align: center !important;
    }

    /* Transform Hamburger into an 'X' */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* 2. Global Typography Adjustments */
    .page-title {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    .section-heading {
        font-size: 1.8rem;
    }

    /* 3. Research & Portfolio Layout Adjustments */
    .research-split {
        flex-direction: column; /* Stacks text on top of the list */
        gap: 30px;
    }
    
    .right-list {
        width: 100%;
        padding: 25px;
        box-sizing: border-box;
    }

    /* 4. Hobby/Grid & Projects Adjustments */
    .hobbies-grid {
        display: grid;
        grid-template-columns: 1fr; /* Stacks 2x2 grid into 1 single column */
        gap: 30px;
    }

    .projects-slider {
        display: flex;
        flex-direction: column; /* Stacks project cards vertically */
        gap: 20px;
    }

    /* 5. Footer Adjustments */
    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px; /* Spaces out the links nicely for tapping */
    }

    .footer-links li {
        margin-bottom: 0; /* Overrides desktop margins so they are perfectly centered */
    }
}

.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--accent-color, #d35400);
    margin-left: 5px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}