/* 
   THEME: Obsidian & Neon
   FONT: Outfit (UI), JetBrains Mono (Code)
*/

:root {
    --bg-deep: #050507;
    --bg-surface: #0a0a0f;
    --bg-card: rgba(25, 25, 35, 0.4);

    --accent-primary: #6d28d9;
    /* Deep Violet */
    --accent-secondary: #06b6d4;
    /* Cyan */
    --accent-success: #10b981;
    --accent-glow: rgba(109, 40, 217, 0.5);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;

    --border-light: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(6, 182, 212, 0.3);

    --font-heading: 'Outfit', sans-serif;
    --font-code: 'JetBrains Mono', monospace;
}

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

/* Custom Scrollbar */
/* Hidden Scrollbar (Premium Feel) */
::-webkit-scrollbar {
    display: none;
}

html, body {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-heading);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Effects */
/* Background Effects */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Behind content, in front of base bg */
    opacity: 0.6; /* Subtle blend */
    pointer-events: none; /* Let clicks pass through */
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSc1MDAnIGhlaWdodD0nNTAwJz48ZmlsdGVyIGlkPSdub2lzZSc+PHZlVHVyYnVsZW5jZSB0eXBlPSdmcmFjdGFsTm9pc2UnIGJhc2VGcmVxdWVuY3k9JzAuNjUnIG51bU9jdGF2ZXM9JzMnIHN0aXRjaFRpbGVzPSdzdGl0Y2gnLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0nMTAwJScgaGVpZ2h0PScxMDAlJyBmaWx0ZXI9J3VybCgjbm9pc2UpJyBvcGFjaXR5PScwLjA1Jy8+PC9zdmc+');
    z-index: -1;
    pointer-events: none;
    /* Performance Fix */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.blob {
    position: fixed;
    width: 1000px; /* Larger to spread gradient */
    height: 1000px;
    /* Fake blur with softer gradient - 0 cost */
    background: radial-gradient(circle closest-side, rgba(109, 40, 217, 0.3) 0%, transparent 100%);
    /* filter: blur(40px); REMOVED for performance */
    opacity: 1;
    border-radius: 50%;
    z-index: -2;
    animation: drift 25s infinite alternate ease-in-out; /* Slower */
    /* Performance Fix */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.blob-1 {
    top: -300px;
    left: -300px;
    background: radial-gradient(circle closest-side, rgba(109, 40, 217, 0.3) 0%, transparent 100%);
}

.blob-2 {
    bottom: -300px;
    right: -300px;
    background: radial-gradient(circle closest-side, rgba(6, 182, 212, 0.3) 0%, transparent 100%);
    animation-delay: -12s;
}

@keyframes drift {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(50px, 50px);
    }
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    scroll-margin-top: 6rem; /* Fix for sticky header overlap */
    /* Performance: Isolate layout calculations */
    contain: paint layout;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

.section-heading {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.section-sub {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 4rem;
    max-width: 600px;
}

/* Navigation */
.navbar {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    max-width: 100% !important;
    /* Force full width */
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: -0.5px;
}

.logo .dot {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    list-style: none;
    /* Removed bullets */
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover {
    color: #fff;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff !important;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.btn-primary:hover {
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Hero */
#hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: 4rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(109, 40, 217, 0.1);
    color: var(--accent-secondary);
    border: 1px solid rgba(109, 40, 217, 0.3);
    font-family: var(--font-code);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

h1.split-text {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.highlight-text {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    position: relative;
    display: inline-block;
}

.highlight-text::before {
    content: 'Self-Healing';
    position: absolute;
    color: var(--accent-secondary);
    width: 0%;
    overflow: hidden;
    border-right: 2px solid var(--accent-secondary);
    animation: fillText 3s forwards 0.5s;
    white-space: nowrap;
}

@keyframes fillText {
    to {
        width: 100%;
        border-right-color: transparent;
    }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.code-pill {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-code);
    color: var(--accent-secondary);
    font-size: 0.9em;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-glow {
    background: linear-gradient(135deg, var(--accent-primary), #4c1d95);
    color: #fff;
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.4);
    border: none;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(109, 40, 217, 0.6);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: #fff;
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

/* Terminal Visual */
.terminal-window {
    background: #0F0F14;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    font-family: var(--font-code);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.terminal-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.terminal-header {
    background: #1A1A22;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-light);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.title {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 1.5rem;
    color: #d4d4d4;
    font-size: 0.9rem;
}

.prompt {
    margin-bottom: 0.5rem;
}

.user {
    color: var(--accent-primary);
}

.path {
    color: var(--accent-secondary);
}

.sep {
    color: #fff;
}

.output {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.output.success {
    color: var(--accent-success);
}

/* Philosophy, Architecture, and Failures */
#philosophy,
#architecture,
#failures {
    padding: 6rem 0;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.philo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    padding: 2.5rem;
    border-radius: 16px;
    transition: 0.3s;
}

.philo-card:hover {
    border-color: var(--accent-secondary);
    transform: translateY(-5px);
    background: rgba(6, 182, 212, 0.05);
}

.philo-card .icon {
    font-size: 2rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.philo-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.philo-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Achievements Strip */
.achievements-strip {
    padding: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    /* margin-top: -2rem; Removed to fix overlap/spacing issues */
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.achievements-grid {
    display: flex;
    justify-content: flex-start; /* Align left with other content */
    flex-wrap: wrap;
    gap: 4rem; /* Consistent wide spacing */
    text-align: left; /* specific items can be left aligned */
}

.achievement-item {
    flex: 1 1 200px;
}

.achievement-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.achievement-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* About Section */
#about {
    padding: 4rem 0;
    /* Reduced from 6rem */
}

.about-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.15rem;
    max-width: 900px;
}

.about-content p {
    margin-bottom: 1.5rem;
    /* Tighter paragraph spacing */
}

/* Expertise Grid */
#expertise {
    padding: 4rem 0; /* Standardized to 4rem */
}

/* Projects (Bento Grid) */
#projects {
    padding: 4rem 0; /* Standardized to 4rem */
}

/* ... existing grid styles ... */

/* Experience Section */
#experience {
    padding: 4rem 0; /* Standardized to 4rem */
}

/* ... existing timeline styles ... */

/* Skills & Certs Dual Col */
#skills-certs {
    padding: 4rem 0; /* Standardized to 4rem */
}

/* Reliability Lessons Section (New) */
#failures {
    padding: 4rem 0; /* Standardized to 4rem */
    position: relative;
    /* For bg elements */
    z-index: 1;
}

/* Core Expertise (Pillars) */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem; /* Reduced gap */
    margin-top: 2rem;
}

.expertise-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.5rem;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), 
                box-shadow 0.6s ease, 
                border-color 0.6s ease;
    height: 100%;
    /* 3D Context via Variables */
    transform-style: preserve-3d;
    perspective: 1000px;
    transform: perspective(1000px) rotateX(var(--tilt, 0deg)) translateY(var(--hover-y, 0));
    will-change: transform;
}

/* Spotlight Effect */
.expertise-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        800px circle at var(--mouse-x) var(--mouse-y),
        rgba(255, 255, 255, 0.06),
        transparent 40%
    );
    z-index: 3;
    opacity: 0; 
    transition: opacity 0.5s;
    pointer-events: none;
    border-radius: 14px;
}

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

.expertise-card:hover {
    --hover-y: -10px; /* Enhanced hover lift */
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.expertise-icon {
    font-size: 2rem; /* Reduced from 2.5rem */
    color: var(--accent-primary);
    margin-bottom: 1rem; /* Reduced */
    display: inline-block;
    padding: 0.8rem; /* Reduced */
    background: rgba(56, 189, 248, 0.1);
    border-radius: 10px;
}

.expertise-card h3 {
    font-size: 1.25rem; /* Reduced from 1.5rem */
    margin-bottom: 0.8rem;
    color: #fff;
}

.expertise-card p {
    color: var(--text-secondary);
    line-height: 1.5; /* Slightly tighter */
    margin-bottom: 0; /* Remove bottom margin */
    font-size: 0.95rem; /* Slightly smaller text */
}

.expertise-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem; /* Add spacing if tags are used */
}

.expertise-tags span {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Projects (Bento Grid) */
#projects {
    padding: 6rem 0;
}



.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    grid-auto-rows: minmax(300px, auto);
}

.project-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Subtle border */
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

/* Spotlight Effect Layer */
.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    /* Border width */
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}

/* Hover State */
.project-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    border-color: rgba(109, 40, 217, 0.5);
    /* Primary Accent Border */
    background: rgba(25, 25, 40, 0.8);
}

/* Wide Card - Full Width Feature */
.wide-card {
    grid-column: span 2;
    background: linear-gradient(145deg, rgba(20, 20, 30, 0.8), rgba(109, 40, 217, 0.15));
    min-height: 350px;
}

/* Content Styling */
.card-header {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-family: var(--font-code);
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(90deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.problem-solution {
    margin-top: auto;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.problem {
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.problem strong {
    color: #f87171;
}

/* Red for Problem */
.solution strong {
    color: #34d399;
}

/* Green for Solution */

.tech-stack {
    margin-top: 2rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.tech-stack span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .wide-card {
        grid-column: auto;
    }
}



.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    z-index: 2;
}

.problem-solution {
    margin-top: auto;
    font-size: 0.9rem;
    color: var(--text-secondary);
    z-index: 2;
}

.problem {
    margin-bottom: 0.8rem;
}

.solution {
    color: #d1d5db;
}

.tech-stack {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    z-index: 2;
}

.tech-stack span {
    font-size: 0.8rem;
    color: var(--accent-secondary);
}

.card-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 10rem;
    color: rgba(255, 255, 255, 0.02);
    z-index: 1;
}

/* Experience */
#experience {
    padding: 6rem 0;
    background: linear-gradient(to bottom, transparent, #000);
}

.timeline-v2 {
    border-left: 2px solid var(--border-light);
    margin-left: 1rem;
    padding-left: 2rem;
}

.role-block {
    margin-bottom: 4rem;
    position: relative;
}

.role-block::before {
    content: '';
    position: absolute;
    left: -39px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: var(--bg-deep);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
}

.role-block.current::before {
    background: var(--accent-primary);
    box-shadow: 0 0 15px var(--accent-primary);
}

.role-date {
    font-family: var(--font-code);
    color: var(--accent-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.role-main h3 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.role-main h4 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 1rem;
}

.role-main ul {
    padding-left: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.role-main li {
    margin-bottom: 0.85rem;
    line-height: 1.7;
}

/* Skills & Certs Dual Col */
#skills-certs {
    padding: 6rem 0;
}

.dual-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

@media(max-width: 800px) {
    .dual-col {
        grid-template-columns: 1fr;
    }
}

.cert-column {
    align-self: start; /* Required for sticky in grid */
    position: sticky;
    top: 6rem; /* Space from top while scrolling */
}

.cert-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: 0.3s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.cert-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-secondary);
}

.cert-badge {
    font-weight: 800;
    font-size: 1.1rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #252530;
    color: #fff;
}

.gold .cert-badge {
    border: 2px solid #fbbf24;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.cert-item.gold:hover {
    border-color: #fbbf24;
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.2);
}

.red .cert-badge {
    border: 2px solid #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.cert-item.red:hover {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

/* Visual Tech Grid */
.tech-category {
    margin-bottom: 2.5rem;
}

.tech-category h4 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid var(--accent-primary);
    padding-left: 10px;
}

.tech-grid-visual {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

.tech-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tech-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.tech-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    transition: 0.3s;
}

.tech-card:hover i {
    color: #fff;
    filter: drop-shadow(0 0 8px var(--accent-primary));
}

.tech-card span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.tech-group {
    margin-bottom: 2rem;
}

.tech-group h4 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pill-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.pill-cloud span {
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: 0.3s;
}

.pill-cloud span:hover {
    border-color: var(--accent-secondary);
    background: rgba(6, 182, 212, 0.1);
}

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

.email-link {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin: 2rem 0;
    color: #fff;
}

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

.socials {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.socials a {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.socials a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        display: none;
    }

    .split-text {
        font-size: 3rem;
        align-items: center;
    }

    .cta-group {
        justify-content: center;
    }
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
}

/* Mobile Devices */
@media (max-width: 768px) {

    /* Navbar */
    .nav-content {
        flex-direction: row;
        /* Keep logo and burger side by side */
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        position: relative;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        /* Inspect full viewport */
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 7, 0.9);
        /* Deep semi-transparent black */
        backdrop-filter: blur(15px);
        /* The "Glass" effect */
        -webkit-backdrop-filter: blur(15px);
        padding: 0;
        z-index: 999;
        gap: 3rem;
        /* Spacing between huge links */
    }

    .nav-links.active {
        display: flex;
        animation: fadeIn 0.3s ease-in-out;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .nav-links li {
        width: auto;
    }

    .nav-links a {
        font-size: 1.5rem;
        /* Larger text for immersive feel */
        color: #fff;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
        /* Ensure button stays above the overlay */
        position: relative;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    /* Hero */
    h1.split-text {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        display: block;
        /* Ensure full width behavior */
    }

    /* Global Spacing */
    #philosophy,
    #architecture,
    #failures,
    #projects,
    #experience,
    #skills-certs,
    footer {
        padding: 4rem 0;
        /* Reduced from 6rem */
    }

    .container {
        padding: 0 1.5rem;
    }

    .section-heading {
        font-size: 2.2rem;
        /* Scale down headings */
    }

    /* Experience Timeline Mobile */
    .timeline-v2 {
        margin-left: 0;
        padding-left: 1.5rem;
        border-left-width: 2px;
    }

    .role-block::before {
        left: -33px;
        /* Re-align dot with new border position */
    }

    .role-main h3 {
        font-size: 1.4rem;
    }
}
/* =========================================
   PREMIUM ANIMATIONS (Scroll & Glow) 
   ========================================= */

/* Scroll Reveal Base */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.fade-in-section.visible {
    opacity: 1;
    transform: none;
}

/* Staggered Grid Entrance */
/* Initially hide cards */
.expertise-grid .expertise-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Trigger them when parent section is visible */
.fade-in-section.visible .expertise-grid .expertise-card {
    opacity: 1;
    transform: translateY(0);
}

/* Delays */
.fade-in-section.visible .expertise-grid .expertise-card:nth-child(1) { transition-delay: 0.1s; }
.fade-in-section.visible .expertise-grid .expertise-card:nth-child(2) { transition-delay: 0.2s; }
.fade-in-section.visible .expertise-grid .expertise-card:nth-child(3) { transition-delay: 0.3s; }
.fade-in-section.visible .expertise-grid .expertise-card:nth-child(4) { transition-delay: 0.4s; }
.fade-in-section.visible .expertise-grid .expertise-card:nth-child(5) { transition-delay: 0.5s; }
.fade-in-section.visible .expertise-grid .expertise-card:nth-child(6) { transition-delay: 0.6s; }


/* Hero Text Shine Effect */
@keyframes shine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.highlight-text {
    display: inline-block; /* Required for transform/clip */
    background: linear-gradient(
        to right, 
        var(--accent-secondary) 20%, 
        #fff 50%, 
        var(--accent-secondary) 80%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

/* Active Nav Link */
.nav-links a.active-link {
    color: var(--accent-primary);
    font-weight: 700;
    position: relative;
}

.nav-links a.active-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-secondary);
    box-shadow: 0 0 10px var(--accent-secondary);
}

/* --- Hyper-Premium Additions --- */

/* Preloader */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-deep);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}

.loader-bar {
    width: 0%;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-primary);
    transition: width 0.5s ease;
}

body.loaded .loader-overlay {
    opacity: 0;
    visibility: hidden;
}


