:root {
    --bg-color: #050a14;
    --bg-secondary: #0a1120;
    --text-primary: #e0e6ed;
    --text-secondary: #94a3b8;

    /* Tech Accents */
    --primary-color: #00f2ff;
    /* Cyan Neon */
    --primary-glow: rgba(0, 242, 255, 0.4);

    --secondary-color: #7000ff;
    /* Deep Electric Purple */
    --accent-color: #ffaa00;
    /* Amber/Warning UI */

    /* UI Elements */
    --card-bg: rgba(10, 17, 32, 0.75);
    --border-color: rgba(0, 242, 255, 0.3);
    /* Tech Blue Border */

    /* Fonts */
    --font-family: 'Outfit', sans-serif;
    --font-heading: 'Rajdhani', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- Utilities --- */
h1, h2, h3, h4, h5, h6,
.navbar, .nav-logo, .nav-links, .nav-links a,
.btn, .skill-icon, .company-icon,
img, .scroll-down-indicator, 
.hero-greeting, .hero-name, .hero-title, .hero-actions,
.section-header, .tech-stack span, .project-link,
.edu-header, .company-meta, .role-type, .role-date, .institution,
i, .fas, .fab, footer {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Glassmorphism -> Tech Panel Style */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    /* Sharper corners for tech look */
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    /* Corner Accents using pseudo elements could be added here, 
       but for clean code let's just stick to borders and glow */
}

/* Tech Panel Corner Accents simulation */
.glass-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
    border-top-left-radius: 4px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.glass-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
    border-bottom-right-radius: 4px;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.glass-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.15);
}

.glass-card:hover::before,
.glass-card:hover::after {
    opacity: 1;
}

/* --- Navigation (Mission Control) --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.2rem 2rem;
    transition: all 0.4s ease;
    border-bottom: 1px solid rgba(0, 242, 255, 0.05);
    background: linear-gradient(to bottom, rgba(5, 10, 20, 0.9), rgba(5, 10, 20, 0.6));
    backdrop-filter: blur(5px);
}

.navbar.scrolled {
    padding: 0.8rem 2rem;
    background: rgba(5, 10, 20, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Blinking status led for logo */
.nav-logo::before {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
    animation: pulse 2s infinite;
    flex-shrink: 0;
}

.logo-dot {
    color: var(--primary-color);
    display: none;
    /* Replaced by LED */
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-links a::before {
    content: '[';
    margin-right: 5px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-links a::after {
    content: ']';
    margin-left: 5px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px var(--primary-color);
}

.nav-links a:hover::before,
.nav-links a:hover::after {
    opacity: 1;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 6rem 2rem 2rem;
    /* Removed radial gradient, using canvas now */
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    width: 100%;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-greeting {
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    letter-spacing: 1px;
}

.hero-name {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 2em;
}

.hero-title::after {
    content: ' _';
    /* Blinking cursor style */
    animation: blink 0.7s infinite;
    color: var(--primary-color);
}

.hero-description {
    max-width: 500px;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* HUD Button Style */
.btn {
    padding: 0.8rem 1.8rem;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 2px;
    /* Sharp corners */
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: rgba(0, 242, 255, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}

.btn-primary:hover {
    background-color: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Hero Image */
.hero-image-wrapper {
    flex: 0 0 350px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-blob {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    animation: pulse 4s infinite alternate;
}

.profile-img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    z-index: 1;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
    transition: transform 0.5s ease;
}

.profile-img:hover {
    transform: scale(1.02);
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.4);
}

/* Scroll Indicator */
.scroll-down-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    gap: 0.5rem;
}

.mouse {
    width: 20px;
    height: 32px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    display: flex;
    justify-content: center;
    padding-top: 5px;
}

.wheel {
    width: 2px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 1px;
    animation: scroll 1.5s infinite;
}

/* --- Sections General --- */
main {
    padding: 0 2rem;
}

.resume-section {
    max-width: 1000px;
    margin: 8rem auto;
    scroll-margin-top: 6rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.resume-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
}

.section-header::after {
    content: '';
    display: block;
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    opacity: 0.5;
}

/* --- Skills Enhanced (Data Modules) --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Accent Colors Definition */
.accent-blue {
    --card-accent: #00f2ff;
}

.accent-green {
    --card-accent: #00ff9d;
}

.accent-purple {
    --card-accent: #bf00ff;
}

.accent-orange {
    --card-accent: #ffaa00;
}

.skill-card {
    border-top: 2px solid var(--card-accent);
    background: linear-gradient(145deg, rgba(10, 17, 32, 0.9), rgba(10, 17, 32, 0.6));
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-card:hover {
    border-color: var(--card-accent);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 10px var(--card-accent) inset;
    transform: translateY(-2px);
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.skill-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-primary);
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.skill-icon {
    font-size: 1.2rem;
    color: var(--card-accent);
    background: rgba(255, 255, 255, 0.05);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    border: 1px solid var(--card-accent);
    box-shadow: 0 0 5px var(--card-accent);
}

.skill-card:hover .skill-icon {
    background: var(--card-accent);
    color: #000;
}

.skill-card ul li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    padding-left: 0.5rem;
    transition: all 0.2s;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
}

.skill-card ul li::before {
    content: '[ ]';
    color: var(--card-accent);
    margin-right: 0.8rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

.skill-card:hover ul li {
    color: var(--text-primary);
    transform: translateX(5px);
}

.skill-card:hover ul li::before {
    content: '[x]';
    opacity: 1;
    text-shadow: 0 0 5px var(--card-accent);
}


/* --- Experience Timeline (Grouped) --- */
.timeline {
    /* No left border on the main container anymore */
    border-left: none;
    margin-left: 0;
    padding-left: 0;
}

.company-group {
    /* Using the existing glass-card style, but customized */
    padding: 2rem;
    margin-bottom: 2rem;
}

.company-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.company-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    border-radius: 4px;
}

.company-info h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.company-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Internal Timeline for Roles */
.role-timeline {
    position: relative;
    padding-left: 1rem;
}

/* Connecting Line */
.role-timeline::before {
    content: '';
    position: absolute;
    left: 29px;
    /* Align with dots center */
    top: 10px;
    bottom: 20px;
    width: 2px;
    background: var(--border-color);
}

.role-item {
    position: relative;
    padding-left: 4rem;
    /* Space for dot and line */
    margin-bottom: 2.5rem;
}

.role-item:last-child {
    margin-bottom: 0;
}

/* The Dot */
.role-dot {
    position: absolute;
    left: 20px;
    /* (60px icon center is 30, but we are inside pad) - adjusted for visual alignment */
    /* Let's align it with the line at left: 29px (center of line) -> dot center at 30px */
    left: 24px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px var(--primary-color);
}

/* Active/Current Role Dot Emphasis */
.role-item:first-child .role-dot {
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
}

.role-content h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0 0 0.3rem 0;
    font-family: var(--font-heading);
}

.role-type,
.role-date {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-bottom: 0.2rem;
}

.role-content p {
    margin-top: 0.8rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.role-content ul {
    margin-top: 0.8rem;
    padding-left: 1rem;
}

.role-content ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
    color: var(--text-secondary);
}

.role-content ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-family: var(--font-mono);
}

/* --- Projects (Mission Files) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    border-left: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.project-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tech-stack span {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--primary-color);
    background: rgba(0, 242, 255, 0.1);
    padding: 4px 8px;
    border: 1px solid rgba(0, 242, 255, 0.2);
    border-radius: 2px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    width: fit-content;
    transition: all 0.3s;
    background: rgba(0, 0, 0, 0.3);
}

.project-link:hover {
    color: #000;
    background: var(--primary-color);
    border-color: var(--primary-color);
    text-decoration: none;
    box-shadow: 0 0 15px var(--primary-color);
}

.project-link i {
    transition: transform 0.3s;
}

.project-link:hover i {
    transform: rotate(360deg);
}

/* --- Education --- */
.edu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.edu-header h3 {
    color: var(--text-primary);
}

.grad-date {
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.institution {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.edu-details {
    color: var(--text-secondary);
    max-width: 80ch;
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4rem;
    font-family: var(--font-mono);
    border-top: 1px solid var(--border-color);
    background: linear-gradient(to top, rgba(0, 242, 255, 0.05), transparent);
}

/* --- Animations --- */
@keyframes blink {
    50% {
        opacity: 0;
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.98);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.02);
        opacity: 1;
    }
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        /* Image on top for mobile */
        text-align: center;
        gap: 2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image-wrapper {
        flex: 0 0 auto;
        width: 100%;
    }

    .profile-img {
        width: 200px;
        height: 200px;
    }

    .nav-links {
        display: none;
    }

    .nav-container {
        justify-content: center;
    }

    /* Ensure grids go to single column on mobile */
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-name {
        font-size: 2.5rem;
    }

    /* Timeline Adjustments for Mobile */
    .role-item {
        padding-left: 2.5rem;
        /* Reduce padding */
    }

    .role-timeline::before {
        left: 14px;
        /* Move line closer */
    }

    .role-dot {
        left: 9px;
        /* Move dot closer */
    }

    .scroll-down-indicator {
        display: none;
    }
}