/* GENERAL STYLES */
:root {
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
    --cta-color-rgba: rgba(58, 134, 255, 0.75);
    --cta-hover-color-rgba: rgba(58, 134, 255, 0.9);
    --border-radius: 24px;
    --transition-speed: 0.4s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif; background-color: var(--background-color);
    color: var(--primary-text-color); line-height: 1.6; overflow-x: hidden;
}

/* GLASS EFFECT */
.glass-effect {
    background-color: rgba(40, 40, 40, 0.6); backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, 0.1);
}

/* SCROLLING HEADER - NAME */
.scrolling-header {
    position: fixed; top: 28px; left: 40px; z-index: 1001;
    opacity: 0; transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none;
}
.anirudh-nav-link {
    font-weight: 700; color: var(--primary-text-color); font-size: 1.5rem;
    text-decoration: none;
}

/* FLOATING NAVIGATION */
.floating-nav {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    border-radius: 30px; padding: 8px; /* Adjusted padding for a snugger fit */
    display: flex; gap: 8px; z-index: 1000;
    transition: all 0.3s ease-in-out; height: 54px; align-items: center;
}
.nav-link {
    padding: 8px 16px; color: var(--secondary-text-color); text-decoration: none;
    font-weight: 500; border-radius: 22px; transition: all 0.3s ease;
}
.nav-link.active, .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1); color: var(--primary-text-color);
}

/* MAIN CONTENT */
#main-content {
    padding: 35vh 5% 100px;
    max-width: 1200px; margin: 0 auto;
}
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* HEADER & TITLE */
.main-header {
    text-align: center; margin-bottom: 100px;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.name-title {
    font-size: 5rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 8px;
}
.subtitle { font-size: 1.2rem; color: var(--secondary-text-color); }

/* SCROLLED & STATIC PAGE STATE */
body.scrolled .main-header, body.is-static-page .main-header { 
    opacity: 0; transform: translateY(-20px); pointer-events: none; 
}
body.scrolled .scrolling-header, body.is-static-page .scrolling-header { 
    opacity: 1; transform: translateY(0); pointer-events: auto;
}

/* PROJECT GRID */
.uniform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.grid-item {
    position: relative; overflow: hidden; border-radius: var(--border-radius);
    background-color: var(--surface-color); cursor: pointer; aspect-ratio: 5 / 4;
}
.grid-item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-speed) ease; }
.thumbnail-overlay {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; height: 90px;
    display: flex; align-items: flex-end; background-color: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(100%); transition: transform var(--transition-speed) ease;
}
.grid-item:hover .thumbnail-overlay { transform: translateY(0); }
.thumbnail-info h3 { color: #fff; margin-bottom: 4px; }
.thumbnail-info p { color: var(--secondary-text-color); font-size: 0.9rem; }
.sortable-ghost { opacity: 0.4; background: var(--cta-color-rgba); border-radius: var(--border-radius); }

/* PROJECT MODAL */
.project-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--background-color); z-index: 2000;
    visibility: hidden; transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.5s;
    overflow-y: auto;
}
.project-modal.open { visibility: visible; transform: translateY(0); transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

.back-btn-modal {
    position: fixed; top: 40px; left: 40px;
    background: rgba(30,30,30,0.7); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--primary-text-color);
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2002;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
    opacity: 0; visibility: hidden; pointer-events: none;
}
body.modal-is-open .back-btn-modal {
    opacity: 1; visibility: visible; pointer-events: auto;
}
.back-btn-modal:hover { background: var(--surface-color); }

.project-modal-content {
    max-width: 1200px; margin: 0 auto;
    padding: 5vh 5% 120px;
}
.project-body h2 { font-size: 2.5rem; text-align: center; margin-bottom: 40px; }
.project-body h3 { margin-top: 30px; margin-bottom: 10px; }
.project-body img { width: 100%; border-radius: var(--border-radius); margin-bottom: 20px; }
.project-body p { margin-bottom: 1.2rem; }

.project-footer { 
    position: sticky; bottom: 0; left: 0; width: 100%;
    padding: 20px 0; text-align: center; z-index: 2001;
    background: linear-gradient(to top, var(--background-color) 30%, transparent);
}

/* BUTTONS */
.button {
    display: inline-block; padding: 12px 24px; border: none;
    border-radius: var(--border-radius); text-decoration: none;
    cursor: pointer; transition: all 0.3s ease; font-weight: 500;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.25); }
.cta-button {
    background-color: var(--cta-color-rgba); color: #ffffff;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.cta-button:hover { background-color: var(--cta-hover-color-rgba); }

/* ABOUT & RESUME PAGE */
.page h2 { text-align: center; margin-bottom: 40px; }
.resume-title { font-size: 2.5rem; }
.button-container { text-align: center; margin-bottom: 30px; }
.section-title { margin-top: 40px; margin-bottom: 20px; border-bottom: 1px solid #333; padding-bottom: 10px; }
.timeline-item { margin-bottom: 20px; }
.timeline-item h4 { font-weight: 500; }
.timeline-date { color: var(--secondary-text-color); font-size: 0.9em; margin-bottom: 5px; }
.resume-viewer { width: 100%; height: 80vh; border: 1px solid var(--surface-color); border-radius: var(--border-radius); margin-top: 20px; overflow: hidden; }
.resume-viewer iframe { border: none; }

/* SITE FOOTER */
.site-footer {
    padding: 40px 5%;
    background-color: #1a1a1a;
    border-top: 1px solid var(--surface-color);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.site-footer p {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}
.social-links {
    display: flex;
    gap: 20px;
}
.social-links a {
    color: var(--secondary-text-color);
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: var(--primary-text-color);
}
.social-links svg {
    width: 24px;
    height: 24px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .uniform-grid { grid-template-columns: 1fr; }
    .name-title { font-size: 3rem; }
    #main-content { padding-top: 30vh; }
    
    /* Hide scrolling header on small screens */
    .scrolling-header {
        display: none;
    }
    .back-btn-modal { 
        left: 20px; 
        top: 28px; 
    }
    .project-modal-content { padding-bottom: 120px; }
    .project-body h2 { font-size: 2rem; }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}


