:root {
    --bg-dark: #07070a;
    --card-bg: rgba(18, 18, 24, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #4af626; /* Neon Green */
    --primary-glow: rgba(74, 246, 38, 0.25);
    --secondary: #8be9fd; /* Cyber Cyan */
    --secondary-glow: rgba(139, 233, 253, 0.2);
    --text-white: #f8f8f2;
    --text-muted: #8be9fd;
    --accent: #ff79c6; /* Neon Pink */
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Particle canvas background */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #0d0d16 0%, #050508 100%);
}

/* Elegant glowing badges */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(74, 246, 38, 0.08);
    border: 1px solid rgba(74, 246, 38, 0.25);
    color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    margin-bottom: 20px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 80px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(7, 7, 10, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-white);
}

.logo span {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.terminal-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: rgba(74, 246, 38, 0.12);
    border: 1px solid var(--primary);
    color: var(--primary) !important;
    box-shadow: 0 0 10px var(--primary-glow);
    transition: all 0.25s ease !important;
}

.terminal-btn:hover {
    background: var(--primary) !important;
    color: var(--bg-dark) !important;
    box-shadow: 0 0 20px var(--primary);
    transform: translateY(-2px);
}

/* Main layouts and Sections */
main {
    padding-top: 80px;
}

section {
    padding: 100px 80px;
    max-width: 1300px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    display: block;
    margin-bottom: 10px;
}

.section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 38px;
    font-weight: 700;
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    min-height: calc(100vh - 80px);
}

.hero-content h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.hero-content h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 25px;
}

.hero-content h2 span {
    color: var(--secondary);
}

.hero-content p {
    font-size: 17px;
    color: #a0a0c0;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.primary-btn {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 15px var(--primary-glow);
}

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

.secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-white);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-sphere {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary) 0%, rgba(74,246,38,0) 70%);
    opacity: 0.35;
    filter: blur(40px);
    animation: pulseGlow 4s infinite alternate;
}

.floating-card {
    position: absolute;
    background: rgba(18, 18, 24, 0.75);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    padding: 18px 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: float 5s infinite ease-in-out;
}

.floating-card i {
    color: var(--primary);
    font-size: 24px;
}

.floating-card span {
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 14px;
}

/* Core Engineering Philosophy Section */
.philosophy-section {
    border-top: 1px solid var(--card-border);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.philosophy-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 35px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.philosophy-card:hover {
    border-color: var(--secondary);
    transform: translateY(-5px);
}

.p-icon {
    font-size: 32px;
    color: var(--secondary);
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--secondary-glow);
}

.philosophy-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    margin-bottom: 12px;
}

.philosophy-card p {
    font-size: 15px;
    color: #a0a0c0;
}

/* Timeline/Story Section */
.story-section {
    border-top: 1px solid var(--card-border);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--card-border);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 40px;
    height: 40px;
    right: -20px;
    top: 15px;
    background: var(--bg-dark);
    border: 2px solid var(--primary);
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-item.right .timeline-dot {
    left: -20px;
}

.timeline-content {
    padding: 25px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    position: relative;
}

.timeline-content .date {
    font-size: 13px;
    font-weight: 700;
    color: var(--secondary);
    display: block;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 15px;
    color: var(--text-white);
    opacity: 0.8;
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 14px;
    color: #a0a0c0;
}

/* Projects Showcase Section */
.projects-section {
    border-top: 1px solid var(--card-border);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 35px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--primary);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 100% 0%, var(--primary-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover .card-glow {
    opacity: 1;
}

.card-icon {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 20px;
    text-shadow: 0 0 15px var(--primary-glow);
}

.project-card h3 {
    font-size: 22px;
    margin-bottom: 6px;
}

.project-card p.specs {
    font-size: 13px;
    color: var(--secondary);
    font-family: 'Fira Code', monospace;
    margin-bottom: 15px;
}

.project-card p {
    font-size: 15px;
    color: #a0a0c0;
    margin-bottom: 25px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tags span {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    color: var(--secondary);
}

/* Skill Inventory Grid Section */
.skills-section {
    border-top: 1px solid var(--card-border);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
}

.skill-category h3 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--primary);
}

.skill-bars {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.skill-tag:hover {
    border-color: var(--secondary);
    background: rgba(139,233,253,0.05);
    color: var(--secondary);
    transform: translateY(-2px);
}

/* Secure Connection Portal (Contact Section) */
.contact-section {
    border-top: 1px solid var(--card-border);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.collab-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--primary);
}

.form-group select option {
    background: #0f0f14;
    color: var(--text-white);
}

.submit-btn {
    align-self: flex-start;
    border: none;
}

.form-feedback {
    font-size: 14px;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.form-feedback.success {
    background: rgba(74, 246, 38, 0.08);
    border-color: rgba(74, 246, 38, 0.3);
    color: var(--primary);
}

.form-feedback.hidden {
    display: none;
}

/* Floating AI Chat Widget Drawer */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: var(--bg-dark);
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 10px 30px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-toggle-btn:hover {
    transform: scale(1.08);
}

.chat-toggle-btn .pulse {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulseBorder 2s infinite;
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    border-radius: 16px;
    background: rgba(18, 18, 24, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-window.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(7,7,10,0.5);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-title i {
    font-size: 22px;
    color: var(--primary);
}

.chat-title h4 {
    font-size: 15px;
    font-weight: 600;
}

.chat-title span {
    font-size: 11px;
    color: var(--secondary);
    display: block;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.close-btn:hover {
    opacity: 1;
}

.chat-body {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Styling Chat Messages */
.msg {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
}

.system-msg {
    align-self: flex-start;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--card-border);
    color: #d8d8d8;
}

.user-msg {
    align-self: flex-end;
    background: var(--secondary);
    color: var(--bg-dark);
    font-weight: 500;
}

.ai-msg {
    align-self: flex-start;
    background: rgba(74, 246, 38, 0.08);
    border: 1px solid rgba(74, 246, 38, 0.2);
    color: var(--primary);
}

.ai-msg .highlight {
    color: var(--secondary);
    font-weight: bold;
}

.typing-indicator {
    align-self: flex-start;
    color: #a0a0c0;
    font-style: italic;
    font-size: 13px;
}

.chat-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--card-border);
    display: flex;
    gap: 10px;
    background: rgba(7,7,10,0.5);
}

.chat-footer input {
    flex-grow: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--text-white);
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.chat-footer input:focus {
    border-color: var(--primary);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary);
    border: none;
    color: var(--bg-dark);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.send-btn:hover {
    transform: scale(1.05);
}

/* Footer styling */
.footer {
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid var(--card-border);
    background: rgba(7,7,10,0.6);
    color: #707090;
    font-size: 13px;
}

/* Scroll Fade Revelations Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Keyframes Definitions */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    from { transform: scale(1) rotate(0deg); opacity: 0.3; }
    to { transform: scale(1.1) rotate(360deg); opacity: 0.45; }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes pulseBorder {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }
    .nav-links {
        display: none; /* simple drop for responsive velocity */
    }
    section {
        padding: 60px 20px;
    }
    .hero-section {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-content h1 {
        font-size: 44px;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-visual {
        display: none;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .collab-form {
        padding: 25px;
    }
    .timeline::after {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item.right {
        left: 0%;
    }
    .timeline-dot {
        left: 10px !important;
        right: auto;
    }
    .chat-window {
        width: calc(100vw - 60px);
        right: 0;
    }
}
