/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-accent: #2a2a2a;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-color: #007bff;
    --accent-hover: rgba(0, 123, 255, 0.2);
    --border-color: #333333;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==========================================================================
   Layout & Typography
   ========================================================================== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Specific container for standalone pages like Gallery */
.page-container {
    margin: 100px auto 60px auto; 
    padding: 3rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    text-align: center;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.5px;
}

p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.alt-par {
    color: var(--text-main)
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.section {
    padding: 6rem 0;
}

.bg-alt {
    background-color: var(--bg-secondary);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

/* Alternative 1: Floating Island */
/*
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(30, 30, 30, 0.7); 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px; 
    z-index: 1000;
    padding: 0.8rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
*/

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-decoration: none;
    color: var(--text-main);
    transition: opacity 0.3s ease;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* ==========================================================================
   Hero Section & Animated Background
   ========================================================================== */
.hero {
    background: linear-gradient(-45deg, #121212, #1a1a2e, #0f3460, #121212);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    padding: 12rem 0 8rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-alt {
    background: linear-gradient(-45deg, #121212, #1d6e2b, #b90f2b, #121212);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    padding: 12rem 0 8rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;    
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    max-width: 800px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 2rem;
}

/* ==========================================================================
   Resume Header / Executive Profile
   ========================================================================== */
.resume-header {
    padding: 10rem 0 5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.role-title {
    font-size: 1.5rem;
    color: #e0e0e0;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.profile-summary {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.contact-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.contact-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-link:hover {
    color: var(--accent-color);
}

.profile-stats {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #777;
    margin-bottom: 0.2rem;
}

.stat-value {
    font-weight: 600;
    color: #fff;
}

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

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ==========================================================================
   Buttons & Tags
   ========================================================================== */
.btn-primary {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-hover);
}

.status-tag {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--bg-accent);
    color: var(--text-main);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

a.status-tag:hover {
    background: var(--accent-hover);
    border-color: var(--accent-color);
    color: white;
}

/* ==========================================================================
   Cards & Grids
   ========================================================================== */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #555;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 123, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
}

.card h3 {
    font-size: 1.3rem;
    color: #e0e0e0;
}

.project-links {
    margin-top: 1.5rem;
}

/* ==========================================================================
   Gallery Layout (From your original design, adapted for dark theme)
   ========================================================================== */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;  
    margin-top: 2rem;
}

.gallery-img {
    flex: 1 1 250px; 
    max-width: 400px; 
    aspect-ratio: 9 / 16; 
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid var(--border-color);
    transition: transform 0.3s ease, border-color 0.3s ease;
    background-color: #000; 
}

.gallery-img:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

/* ==========================================================================
   Dynamic Animations (Scroll Reveal & Typing Effect)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.typed-text {
    color: var(--accent-color);
}

.typed-text-alt {
    color: var(--text-main);
}


.cursor {
    display: inline-block;
    width: 3px;
    background-color: var(--accent-color);
    margin-left: 0.1rem;
    animation: blink 1s infinite;
}

.cursor.typing {
    animation: none;
}

@keyframes blink {
    0% { background-color: var(--accent-color); }
    49% { background-color: var(--accent-color); }
    50% { background-color: transparent; }
    99% { background-color: transparent; }
    100% { background-color: var(--accent-color); }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */
@media (max-width: 768px) {
    .nav-links {
        display: none; 
    }
    
    .hero {
        padding: 8rem 0 4rem 0;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-container {
        width: 90%;      
        margin: 80px auto 20px auto; 
        padding: 1.5rem;   
        box-sizing: border-box; 
    }

    .gallery-img {
        flex: 1 1 100%; 
        max-width: 100%;
    }
}

/* ==========================================================================
   Interactive Tab Layout
   ========================================================================== */
.interactive-layout {
    display: grid;
    grid-template-columns: 1fr 2.5fr; /* Left sidebar takes less space than content */
    gap: 3rem;
    align-items: start;
    margin-top: 1rem;
}

.tab-sidebar {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--border-color);
}

.tab-link {
    background: none;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 1.2rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    /* Pull margin left to overlap the parent's border */
    margin-left: -2px; 
    border-left: 2px solid transparent;
}

.tab-link:hover {
    color: var(--text-main);
}

.tab-link.active {
    color: var(--accent-color);
    border-left: 2px solid var(--accent-color);
    background: linear-gradient(90deg, rgba(0, 123, 255, 0.05) 0%, transparent 100%);
}

.tab-content-area {
    /* Create a grid context */
    display: grid; 
}

.tab-pane {
    /* Stack ALL panes in the exact same grid cell */
    grid-area: 1 / 1; 
    
    /* Hide inactive panes but keep their physical dimensions */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    /* Setup the slide-in animation directly on the element */
    transform: translateX(20px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.4s;
}

.tab-pane.active {
    /* Reveal the active pane */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

@keyframes slideFadeIn {
    from { 
        opacity: 0; 
        transform: translateX(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* ==========================================================================
   Modern Borderless Showcase (Replaces Cards in Tabs)
   ========================================================================== */
.showcase-content {
    padding: 1rem 0 2rem 1rem;
    animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Big, bold gradient typography */
.gradient-text {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    padding-bottom: 0.15em;
    background: linear-gradient(90deg, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

/* Description with an elegant left accent line */
.showcase-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    border-left: 2px solid var(--accent-color);
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
}

/* Modern "Pill" Tags for Skills */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tech-tags span {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.6rem 1.2rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #cccccc;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.tech-tags span:hover {
    border-color: var(--accent-color);
    background: rgba(0, 123, 255, 0.1);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.15);
}

/* Sleek Glowing Buttons for Projects */
.project-actions {
    margin-top: 1rem;
}

.glow-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.glow-btn .arrow {
    transition: transform 0.3s ease;
}

.glow-btn:hover {
    color: var(--accent-color);
    text-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.glow-btn:hover .arrow {
    transform: translateX(5px);
}

.glow-btn.disabled {
    color: #555;
    cursor: not-allowed;
}

.glow-btn.disabled:hover {
    text-shadow: none;
}

/* Mobile Fallback: Switches from Vertical sidebar to Horizontal scrolling tabs */
@media (max-width: 768px) {
    .interactive-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tab-sidebar {
        flex-direction: row;
        overflow-x: auto;
        border-left: none;
        border-bottom: 2px solid var(--border-color);
        padding-bottom: 0;
        /* Hides scrollbar for cleaner look */
        -ms-overflow-style: none;  
        scrollbar-width: none;  
    }
    
    .tab-sidebar::-webkit-scrollbar { 
        display: none; 
    }

    .tab-link {
        margin-left: 0;
        margin-bottom: -2px; /* Overlap bottom border */
        border-left: none;
        border-bottom: 2px solid transparent;
        white-space: nowrap; /* Keeps text on one line */
    }

    .tab-link.active {
        border-left: none;
        border-bottom: 2px solid var(--accent-color);
        background: linear-gradient(180deg, transparent 0%, rgba(0, 123, 255, 0.05) 100%);
    }
}