/* ==========================================================================
   CSS Variables & Global Reset
   ========================================================================== */
   :root {
    --bg-dark: #050505;
    --bg-panel: rgba(15, 15, 15, 0.6);
    --bg-panel-hover: rgba(25, 25, 25, 0.8);
    
    --text-primary: #f2f2f2;
    --text-secondary: #8892b0;
    --text-accent: #64ffda; /* Neon cyan/green vibe */
    --text-accent-alt: #1e90ff; /* Dodged Blue vibe */
    
    --border-color: rgba(255, 255, 255, 0.05);
    --border-hover: rgba(100, 255, 218, 0.3);
    
    --shadow-heavy: 0 20px 40px -15px rgba(0,0,0,0.7);
    --shadow-glow: 0 0 20px rgba(100, 255, 218, 0.2);
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --sidebar-width: 450px;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtly grainy pattern for premium texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   Animated Background Mesh
   ========================================================================== */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 15% 50%, rgba(30, 60, 100, 0.15), transparent 40%),
                radial-gradient(circle at 85% 30%, rgba(10, 80, 70, 0.15), transparent 40%);
    animation: pulseBg 10s ease-in-out infinite alternate;
}

@keyframes pulseBg {
    0% { transform: scale(1); filter: hue-rotate(0deg); }
    100% { transform: scale(1.1); filter: hue-rotate(15deg); }
}

/* ==========================================================================
   Layout Architecture (Split Screen)
   ========================================================================== */
.layout-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ==========================================================================
   LEFT SIDEBAR (Fixed)
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    height: 100vh;
    padding: 5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Profiling */
.profile-header {
    margin-bottom: 3rem;
}

.avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 2rem;
}

.avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #112240, #0a192f);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-hover);
    position: relative;
    z-index: 2;
    transform: rotate(-5deg);
    transition: var(--transition);
}

.avatar-container:hover .avatar {
    transform: rotate(0deg) scale(1.05);
}

.avatar-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-accent);
    font-family: var(--font-mono);
}

.avatar-glow {
    position: absolute;
    top: 5px; left: 5px; right: -5px; bottom: -5px;
    background: var(--text-accent);
    filter: blur(15px);
    opacity: 0.3;
    z-index: 1;
    border-radius: 20px;
}

.name {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.title {
    font-size: 1.25rem;
    font-family: var(--font-mono);
    color: var(--text-accent-alt);
    margin-bottom: 1rem;
    min-height: 30px; /* space for typing */
}

/* Typing cursor animation class applied via JS */
.cursor::after {
    content: '|';
    animation: blink 1s step-start infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.tagline {
    font-size: 1.1rem;
    max-width: 320px;
}

/* Navigation Links */
.sidebar-nav ul {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

.nav-line {
    display: inline-block;
    width: 30px;
    height: 1px;
    background-color: var(--text-secondary);
    margin-right: 15px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover .nav-line, .nav-link.active .nav-line {
    width: 60px;
    background-color: var(--text-accent);
}

/* Sidebar Footer Extras */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.social-links a:hover {
    color: var(--text-accent);
    transform: translateY(-3px);
}

.btn-glow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 0.7rem 2rem;
    border: 1px solid var(--text-accent);
    color: var(--text-accent);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.btn-glow:hover {
    background: rgba(100, 255, 218, 0.1);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   RIGHT CONTENT (Scrollable)
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 5rem 6rem;
    max-width: 1000px;
}

/* Mobile Header is hidden by default */
.mobile-header {
    display: none;
}

/* Common Section Styles */
.section {
    margin-bottom: 10rem;
    position: relative;
}

.section-badge {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Glass Panels (Base for tilt cards) */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-heavy);
    transition: var(--transition);
}

.glass-panel:hover {
    background: var(--bg-panel-hover);
    border-color: var(--border-hover);
}

/* 3D Tilt Wrapper Framework */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.tilt-content {
    transform: translateZ(30px); /* Brings content forward in 3D space */
}

/* ==========================================================================
   About Section
   ========================================================================== */
#about .glass-panel {
    padding: 3rem;
}

.about-text {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.about-text:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Skills Section (Bento Grid)
   ========================================================================== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.bento-box {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.bento-large {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-medium {
    grid-column: span 1;
    grid-row: span 2;
    /* Special AI styling */
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.8), rgba(15, 15, 15, 0.9));
    border: 1px solid rgba(30, 144, 255, 0.3);
}

.bento-medium:hover {
    border-color: rgba(30, 144, 255, 0.6);
    box-shadow: 0 0 20px rgba(30, 144, 255, 0.2);
}

.bento-small {
    grid-column: span 1;
}

.bento-box h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bento-box h3 i {
    color: var(--text-accent);
}

.bento-medium h3 i {
    color: var(--text-accent-alt);
}

/* Skill Chips */
.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: auto;
}

.chip {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    font-size: 0.9rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.chip-core {
    color: var(--text-accent);
    border-color: rgba(100, 255, 218, 0.2);
}

.chip-ai {
    color: var(--text-accent-alt);
    border-color: rgba(30, 144, 255, 0.2);
}

/* Certifications inside Bento */
.cert-list li {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.cert-list li:last-child { margin-bottom: 0; }
.cert-ins { font-size: 0.8rem; color: var(--text-secondary); font-family: var(--font-mono); }

/* ==========================================================================
   Experience Section
   ========================================================================== */
.timeline {
    position: relative;
}

.timeline-event {
    padding: 2.5rem;
    position: relative;
}

.timeline-line {
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-dot {
    position: absolute;
    left: -25px;
    top: 40px;
    width: 12px;
    height: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--text-accent);
    border-radius: 50%;
    z-index: 2;
}

.event-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.role h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.company {
    color: var(--text-accent-alt);
    font-size: 1rem;
}

.date {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.event-details {
    padding-left: 1.2rem;
}

.event-details li {
    margin-bottom: 0.8rem;
    position: relative;
    font-size: 1rem;
}

.event-details li::before {
    content: "▹";
    position: absolute;
    left: -1.2rem;
    color: var(--text-accent);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.project-icon {
    font-size: 2.5rem;
    color: var(--text-accent);
}

.project-links a {
    font-size: 1.2rem;
    margin-left: 15px;
}

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

.project-name {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-body {
    flex-grow: 1;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
    text-align: center;
    padding: 2rem 0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.main-footer p { margin-bottom: 0.5rem; }

/* ==========================================================================
   Media Queries for Responsiveness
   ========================================================================== */

/* Large Tablets / Small Desktops */
@media screen and (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-medium { grid-column: span 2; grid-row: span 1; }
    .bento-small { grid-column: span 1; }
}

/* Tablets and Mobile (Stack layout) */
@media screen and (max-width: 992px) {
    .layout-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 4rem 2rem 2rem 2rem;
        text-align: left;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0 2rem 4rem 2rem;
        max-width: 100%;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-nav {
        display: none; /* Hide scrollspy nav on mobile, mostly clutters */
    }

    .sidebar-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        margin-top: 2rem;
    }
}

/* Small Mobile */
@media screen and (max-width: 600px) {
    .name { font-size: 2.2rem; }
    .title { font-size: 1.1rem; }
    
    .section { margin-bottom: 5rem; }
    .section-title { font-size: 1.8rem; margin-bottom: 2rem; }
    
    .sidebar { padding: 3rem 1.5rem 1.5rem 1.5rem; text-align: center; }
    .sidebar-content { align-items: center; }
    .avatar-container { margin: 0 auto 2rem auto; }
    .tagline { margin: 0 auto; }
    
    .sidebar-footer { flex-direction: column; gap: 1.5rem; justify-content: center; }
    .sidebar-footer .btn-glow { align-self: center; width: 100%; text-align: center; }
    .social-links { justify-content: center; width: 100%; }

    .main-content { padding: 0 1.5rem 3rem 1.5rem; }
    
    #about .glass-panel { padding: 1.5rem; }
    
    .bento-grid { grid-template-columns: 1fr; }
    .bento-large, .bento-medium, .bento-small { grid-column: span 1; }
    .bento-box { padding: 1.5rem; margin-bottom: 1rem; }
    
    .timeline-event { padding: 1.5rem 1rem 1.5rem 1.5rem; }
    .timeline-line { left: 0; }
    .timeline-dot { left: -5px; }
    
    .project-card { padding: 1.5rem; }
    .project-top { margin-bottom: 1rem; }
    .project-icon { font-size: 2rem; }
    .project-name { font-size: 1.2rem; }
}
