@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #040408;
    --bg-card: rgba(10, 10, 18, 0.65);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(150, 123, 179, 0.35); /* Increased contrast */
    
    --accent-primary: #967bb3;
    --accent-primary-rgb: 150, 123, 179;
    --accent-primary-light: #b49fd4; /* High-contrast text/highlight variant */
    --accent-secondary: #a855f7; /* Purple */
    --accent-cyber: #00f0ff; /* Cyber Cyan */
    --accent-cyber-rgb: 0, 240, 255;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --success: #10b981; /* Emerald */
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glow-shadow: 0 0 20px rgba(150, 123, 179, 0.45); /* Increased contrast */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-code: 'Fira Code', monospace;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-dark);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #1e1e30;
    border-radius: 4px;
    border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Background Effects */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: all;
    background: radial-gradient(circle at 50% 50%, #0c0a1a 0%, var(--bg-dark) 100%);
}

.ambient-glows {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.25; /* Increased background glow contrast */
    animation: float 20s infinite alternate ease-in-out;
}

.glow-1 {
    top: 10%;
    left: 15%;
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
}

.glow-2 {
    bottom: 10%;
    right: 15%;
    width: 500px;
    height: 500px;
    background: var(--accent-cyber);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 0;
    background: rgba(4, 4, 8, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: padding 0.3s ease, background 0.3s ease;
}

nav.scrolled {
    padding: 0.85rem 0;
    background: rgba(4, 4, 8, 0.9);
    border-bottom: 1px solid rgba(var(--accent-primary-rgb), 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent-cyber), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    cursor: pointer;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyber), var(--accent-primary));
    transition: width 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem 2rem;
    position: relative;
}

.hero-container {
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.highlight {
    background: linear-gradient(135deg, var(--accent-cyber) 0%, var(--accent-primary) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(var(--accent-primary-rgb), 0.2));
}

.hero-text h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

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

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

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.social-btn:hover {
    color: var(--accent-cyber);
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--accent-cyber);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.15);
}

/* Terminal Widget */
.hero-terminal {
    background: rgba(10, 10, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: var(--card-shadow), 0 0 30px rgba(var(--accent-primary-rgb), 0.1);
    overflow: hidden;
    font-family: var(--font-code);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-buttons {
    display: flex;
    gap: 6px;
}

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

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.terminal-body {
    padding: 1.5rem;
    font-size: 0.85rem;
    color: #e2e8f0;
}

.terminal-line {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.prompt {
    color: var(--accent-cyber);
}

.command {
    color: var(--text-primary);
}

.output {
    color: var(--text-secondary);
    padding-left: 0.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--accent-cyber);
    margin-left: 4px;
    vertical-align: middle;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

/* Common Layout Elements */
.section-padding {
    padding: 7rem 2rem;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title-wrap {
    margin-bottom: 4rem;
    position: relative;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.25), transparent);
    z-index: -1;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 1.05rem;
}

/* Glass Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--accent-primary-rgb), 0.6); /* High contrast border hover */
    box-shadow: var(--card-shadow), 0 10px 30px rgba(var(--accent-primary-rgb), 0.18); /* High contrast shadow hover */
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
}

.about-bio p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.about-bio strong {
    color: var(--text-primary);
}

.skills-wrapper h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.skill-category {
    margin-bottom: 2rem;
}

.skill-category h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-cyber);
    margin-bottom: 1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.45rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(var(--accent-primary-rgb), 0.15);
    border-color: var(--accent-primary-light); /* Uses lighter shade for clear border contrast */
    color: var(--text-primary);
    box-shadow: 0 0 12px rgba(var(--accent-primary-rgb), 0.45);
    transform: scale(1.05);
}

/* Filter Controls */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.4rem;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(var(--accent-primary-rgb), 0.1));
    border-color: var(--accent-cyber);
    color: var(--accent-cyber);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card.hidden {
    display: none;
}

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

.project-type-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-cyber);
    font-weight: 600;
}

.project-gh-link {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.project-gh-link:hover {
    color: var(--text-primary);
}

.project-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    font-size: 0.75rem;
    font-family: var(--font-code);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
}

/* Simulator Panel Styling */
.project-simulator {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

.sim-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    color: var(--text-primary);
    padding: 0.65rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.sim-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 15px rgba(var(--accent-primary-rgb), 0.3);
}

/* Triton Monitor Simulator */
.triton-sim-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 0.75rem;
    font-family: var(--font-code);
    font-size: 0.75rem;
}

.sim-status {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.status-indicator {
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 6px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.sim-chart {
    height: 60px;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.85rem;
    padding-bottom: 2px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent-cyber), var(--accent-primary));
    height: 10%;
    transition: height 0.3s ease;
    border-radius: 2px 2px 0 0;
}

.sim-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.metric-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.metric-val {
    color: var(--text-primary);
    font-weight: bold;
    font-size: 0.8rem;
}

/* LayoverOS Simulator */
.rag-sim-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.rag-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.rag-step.active {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--accent-cyber);
}

.step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-secondary);
}

.rag-step.active .step-num {
    background: var(--accent-cyber);
    color: var(--bg-dark);
}

.step-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.rag-step.active .step-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* Data Platform Simulator */
.spark-sim-nodes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.node-row {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.node-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-family: var(--font-code);
    margin-bottom: 0.35rem;
}

.node-progress-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.node-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    transition: width 0.1s linear;
}

/* Contact Section */
#contact {
    position: relative;
}

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

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group-full {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.form-group input, .form-group textarea {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyber);
    background: rgba(0, 240, 255, 0.02);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.submit-btn {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--accent-cyber) 0%, var(--accent-primary) 100%);
    border: none;
    color: var(--bg-dark);
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.25);
    filter: brightness(1.1);
}

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: rgba(4, 4, 8, 0.5);
    color: var(--text-muted);
    font-size: 0.9rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent-cyber);
}

/* Animations and Utilities */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Scaling */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 576px) {
    .nav-content {
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 1.25rem;
    }
    
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .form-group-full, .submit-btn {
        grid-column: span 1;
    }
    
    .section-padding {
        padding: 5rem 1rem;
    }
}
