/* CSS Reset and Variables */
:root {
    /* Unified Dark Color Palette */
    --primary-dark: #0a0f1c;
    --secondary-dark: #1a1a2e;
    --tertiary-dark: #16213e;
    --quaternary-dark: #2d3748;
    --deep-dark: #0f0a1a;
    
    /* Accent Colors */
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --highlight-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --text-light: #e2e8f0;
    
    /* Background Gradients */
    --bg-gradient-1: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 50%, var(--tertiary-dark) 100%);
    --bg-gradient-2: linear-gradient(135deg, var(--secondary-dark) 0%, var(--tertiary-dark) 50%, var(--quaternary-dark) 100%);
    --bg-gradient-3: linear-gradient(135deg, var(--tertiary-dark) 0%, var(--quaternary-dark) 50%, var(--deep-dark) 100%);
    --bg-gradient-4: linear-gradient(135deg, var(--deep-dark) 0%, var(--primary-dark) 50%, var(--secondary-dark) 100%);
    
    /* Surface Colors */
    --surface-color: rgba(255, 255, 255, 0.05);
    --surface-hover: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    /* Legacy support */
    --dark-bg: var(--primary-dark);
    --light-bg: var(--surface-color);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Neural Network Performance */
    --neural-intensity: 1;
}

/* Animation Keyframes for Data Visualizations */
@keyframes dataFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.7; }
    33% { transform: translateY(-20px) rotate(120deg); opacity: 1; }
    66% { transform: translateY(-10px) rotate(240deg); opacity: 0.8; }
}

@keyframes dataPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

@keyframes dataOrbit {
    0% { transform: rotate(0deg) translateX(50px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

@keyframes dataStream {
    0% { transform: translateX(-100px) translateY(0px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateX(calc(100vw + 100px)) translateY(-50px); opacity: 0; }
}

@keyframes dataMorph {
    0%, 100% { border-radius: 50%; }
    25% { border-radius: 10%; }
    50% { border-radius: 30%; }
    75% { border-radius: 70%; }
}

@keyframes dataConnect {
    0%, 100% { stroke-dashoffset: 1000; }
    50% { stroke-dashoffset: 0; }
}

/* Data Visualization Elements */
.data-element {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.data-circle {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: dataFloat 6s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent-color);
}

.data-square {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    animation: dataPulse 4s ease-in-out infinite;
    box-shadow: 0 0 8px var(--primary-color);
}

.data-triangle {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 8px solid var(--secondary-color);
    animation: dataOrbit 8s linear infinite;
    filter: drop-shadow(0 0 6px var(--secondary-color));
}

.data-hex {
    width: 10px;
    height: 10px;
    background: var(--highlight-color);
    animation: dataMorph 5s ease-in-out infinite;
    box-shadow: 0 0 12px var(--highlight-color);
}

.data-stream {
    width: 3px;
    height: 3px;
    background: var(--success-color);
    border-radius: 50%;
    animation: dataStream 12s linear infinite;
    box-shadow: 0 0 6px var(--success-color);
}

/* Background Data Grid */
.data-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: 
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: dataConnect 10s ease-in-out infinite;
}

/* Floating Data Numbers */
.data-number {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-color);
    opacity: 0.7;
    animation: dataFloat 7s ease-in-out infinite;
    text-shadow: 0 0 5px currentColor;
}

/* Data Connection Lines */
.data-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: dataConnect 8s ease-in-out infinite;
    opacity: 0.3;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-gradient-1);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    max-width: 100vw;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
#header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 15, 28, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: var(--transition);
}

#header.scrolled {
    background: rgba(10, 15, 28, 0.98);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.logo-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding-top: calc(var(--section-padding) + 80px);
    padding-bottom: var(--section-padding);
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--bg-gradient-1);
    position: relative;
    overflow: hidden;
}

.hero-container {
    width: 100%;
}

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

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-normal {
    display: block;
    font-size: 0.7em;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0.5rem 0;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Code Window */
.code-window {
    background: var(--dark-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.code-header {
    background: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}

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

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-content {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-light);
    overflow-x: auto;
}

.code-keyword { color: #c792ea; }
.code-class { color: #ffcb6b; }
.code-function { color: #82aaff; }
.code-param { color: #89ddff; }
.code-string { color: #c3e88d; }

/* Section Styles */
section {
    padding: var(--section-padding) 0;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--bg-gradient-2);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Ensure image container maintains consistent sizing */
.about .image-container {
    flex-shrink: 0;
    min-height: 500px;
}

.about-text .lead {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.image-container {
    width: 100%;
    max-width: 400px;
    height: 500px; /* Fixed height instead of aspect-ratio */
    margin: 0 auto;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    transition: transform 0.3s ease;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

#profile-photo:hover {
    transform: scale(1.02);
}

/* Ensure consistent image sizing across different hosting environments */
@media screen {
    #profile-photo {
        min-height: 100%;
        min-width: 100%;
    }
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
}

.image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.image-overlay p {
    color: white;
    font-size: 1.25rem;
    font-weight: 500;
}

/* Experience Section */
.experience {
    background: var(--surface-color);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

/* Education Section */
.education {
    background: var(--bg-gradient-2);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 20px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 4px solid var(--primary-dark);
    box-shadow: 0 0 0 2px var(--border-color);
}

.timeline-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
    margin-top: 1rem;
}

.timeline-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.timeline-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Projects Section */
.projects {
    background: var(--surface-color);
}

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

.project-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.project-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

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

.tech-tag {
    background: var(--surface-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* Blog Section */
.blog {
    background: var(--light-bg);
}

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

.blog-card {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-date {
    color: var(--accent-color);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.blog-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* Skills Section */
.skills {
    background: var(--bg-gradient-3);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.skills-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.skills-category h3 {
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-name {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.skill-bar {
    background: var(--light-bg);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    width: 0;
    transition: width 2s ease-in-out;
}

.tech-stack {
    text-align: center;
}

.tech-stack h3 {
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.tech-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-item {
    background: var(--light-bg);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
}

.tech-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Contact Section */
.contact {
    background: var(--bg-gradient-4);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-lead {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--secondary-color);
}

.contact-form {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--surface-color);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-visual {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .image-container {
        max-width: 350px;
        height: 440px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation - Modern Design */
    .hamburger {
        display: flex;
        z-index: 1002;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }
    
    .hamburger span {
        width: 22px;
        height: 2px;
        background: var(--text-primary);
        margin: 3px 0;
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        border-radius: 2px;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgba(10, 15, 28, 0.98) 0%, rgba(20, 25, 40, 0.98) 100%);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 1001;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 85%;
        max-width: 280px;
        opacity: 0;
        transform: translateY(20px) scale(0.9);
        transition: all 0.4s ease;
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    
    .nav-menu.active li:nth-child(1) { transition-delay: 0.05s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.15s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.25s; }
    .nav-menu.active li:nth-child(6) { transition-delay: 0.3s; }
    
    .nav-link {
        font-size: 1.3rem;
        font-weight: 600;
        padding: 0.9rem 1.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        margin: 0.4rem 0;
        width: 100%;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-link::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
        transition: left 0.5s ease;
    }
    
    .nav-link:hover::before,
    .nav-link:active::before {
        left: 100%;
    }
    
    .nav-link:hover,
    .nav-link:active,
    .nav-link.active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
        color: var(--primary-color);
        transform: translateX(3px) scale(1.02);
        border-color: rgba(59, 130, 246, 0.4);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Mobile Typography */
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Mobile Containers - Fix Centering */
    * {
        max-width: 100vw;
    }
    
    .container {
        padding: 0 1rem;
        margin: 0 auto;
        width: 100%;
        max-width: 100%;
    }
    
    section {
        padding: 3rem 0;
    }
    
    /* Hero Section Mobile Fix */
    .hero {
        padding-top: 100px;
        min-height: auto;
    }
    
    .hero-container {
        padding: 0;
    }
    
    .hero-content {
        padding: 2rem 0;
        text-align: center;
        margin: 0 auto;
    }
    
    .hero-text {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .text-gradient,
    .text-normal {
        display: inline;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
        text-align: center;
        padding: 0 0.5rem;
        margin: 0 auto 1.5rem;
        max-width: 100%;
    }
    
    .hero-visual {
        display: none; /* Hide code window on mobile */
    }
    
    /* Mobile Buttons - Touch Friendly */
    .btn {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Code Window Mobile Fix */
    .code-window {
        animation: none; /* Disable float animation on mobile */
        transform: none;
    }
    .about-content {
        text-align: center;
    }
    
    .image-container {
        max-width: 280px;
        height: 350px;
        margin: 1rem auto 0;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Form Optimization */
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px;
        padding: 0.75rem;
    }
    
    .form-button {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
    }
    
    /* Mobile Cards and Grid */
    .experience-timeline,
    .skills-grid,
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-item,
    .skill-card,
    .insight-item {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    /* Knowledge Graph Mobile Redesign */
    .knowledge-graph {
        padding: 2rem 0;
    }
    
    .knowledge-graph-container {
        display: none; /* Hide canvas on mobile */
    }
    
    /* Default mobile state - portrait assumed */
    .rotate-phone-prompt {
        display: block;
        visibility: visible;
        text-align: center;
        padding: 3rem 2rem;
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(16, 185, 129, 0.05));
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 20px;
        margin: 2rem 1rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(10px);
    }
    
    .mobile-knowledge-view {
        display: none;
        visibility: hidden;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.02);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin: 1rem;
    }
    
    .phone-icon {
        width: 80px;
        height: 120px;
        margin: 0 auto 2rem;
        position: relative;
        background: linear-gradient(135deg, #3b82f6, #1e40af);
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        animation: phoneRotate 3s ease-in-out infinite, phonePulse 1.5s ease-in-out infinite alternate;
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
        border: 2px solid rgba(255, 255, 255, 0.1);
    }

    @keyframes phonePulse {
        0% {
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        }
        100% {
            box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
        }
    }
    
    .phone-icon::before {
        content: '';
        width: 4px;
        height: 4px;
        background: white;
        border-radius: 50%;
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .phone-icon::after {
        content: '';
        width: 20px;
        height: 3px;
        background: white;
        border-radius: 2px;
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .phone-screen {
        width: 50px;
        height: 85px;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 8px;
        position: relative;
        overflow: hidden;
        box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .phone-screen::before {
        content: '↻';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 24px;
        color: #3b82f6;
        font-weight: bold;
        border-radius: 1px;
    }
    
    .phone-screen::after {
        content: '';
        position: absolute;
        top: 60%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 20px;
        height: 2px;
        background: #3b82f6;
        border-radius: 1px;
    }
    
    @keyframes phoneRotate {
        0%, 20% {
            transform: rotate(0deg) scale(1);
        }
        30% {
            transform: rotate(-10deg) scale(1.05);
        }
        50% {
            transform: rotate(90deg) scale(0.9);
        }
        70% {
            transform: rotate(95deg) scale(0.9);
        }
        80%, 100% {
            transform: rotate(90deg) scale(0.9);
        }
    }
    
    .rotate-prompt-text {
        color: var(--text-primary);
        font-size: 1.3rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
        letter-spacing: -0.02em;
    }
    
    .rotate-prompt-subtitle {
        color: var(--text-secondary);
        font-size: 1rem;
        line-height: 1.6;
        max-width: 280px;
        margin: 0 auto;
    }
    
    /* Remove duplicate mobile-knowledge-view rule - already defined above */
    
    /* Remove initial mobile display states - let media queries handle this */
    
    .knowledge-categories {
        margin-bottom: 2rem;
    }
    
    .category-tabs {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 0.5rem;
    }
    
    .category-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .category-tab {
        padding: 0.75rem 1.25rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        color: var(--text-secondary);
        font-size: 0.875rem;
        font-weight: 500;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .category-tab.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
    }
    
    .category-tab[data-category="audit"] { border-color: #3b82f6; }
    .category-tab[data-category="technical"] { border-color: #10b981; }
    .category-tab[data-category="industry"] { border-color: #8b5cf6; }
    .category-tab[data-category="soft"] { border-color: #f59e0b; }
    
    .knowledge-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .knowledge-card {
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        padding: 1.25rem;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .knowledge-card:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

    .knowledge-card:active {
        transform: translateY(0);
    }
    
    .knowledge-card.audit { border-left: 4px solid #3b82f6; }
    .knowledge-card.technical { border-left: 4px solid #10b981; }
    .knowledge-card.industry { border-left: 4px solid #8b5cf6; }
    .knowledge-card.soft { border-left: 4px solid #f59e0b; }
    
    .knowledge-card h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }
    
    .knowledge-card p {
        font-size: 0.875rem;
        color: var(--text-secondary);
        line-height: 1.5;
    }
    
    .graph-controls,
    .graph-legend {
        display: none; /* Hide desktop controls on mobile */
    }
}

/* Mobile Orientation-Specific Display States - Enhanced with @supports */
@supports (orientation: portrait) {
    @media screen and (max-width: 768px) and (orientation: portrait) {
        .knowledge-graph .rotate-phone-prompt,
        .section .rotate-phone-prompt,
        section .rotate-phone-prompt,
        .rotate-phone-prompt {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        .knowledge-graph .mobile-knowledge-view,
        .section .mobile-knowledge-view,
        section .mobile-knowledge-view,
        .mobile-knowledge-view {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
        }
        
        .knowledge-graph .knowledge-graph-container,
        .section .knowledge-graph-container,
        section .knowledge-graph-container,
        .knowledge-graph-container {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
        }
    }
}

/* Fallback for browsers that don't support orientation in @supports */
@media screen and (max-width: 768px) and (orientation: portrait) {
    .knowledge-graph .rotate-phone-prompt,
    .section .rotate-phone-prompt,
    section .rotate-phone-prompt,
    .rotate-phone-prompt {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .knowledge-graph .mobile-knowledge-view,
    .section .mobile-knowledge-view,
    section .mobile-knowledge-view,
    .mobile-knowledge-view {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .knowledge-graph .knowledge-graph-container,
    .section .knowledge-graph-container,
    section .knowledge-graph-container,
    .knowledge-graph-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

@supports (orientation: landscape) {
    @media screen and (max-width: 768px) and (orientation: landscape) {
        .knowledge-graph .mobile-knowledge-view,
        .section .mobile-knowledge-view,
        section .mobile-knowledge-view,
        .mobile-knowledge-view {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        .knowledge-graph .rotate-phone-prompt,
        .section .rotate-phone-prompt,
        section .rotate-phone-prompt,
        .rotate-phone-prompt {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
        }
        
        .knowledge-graph .knowledge-graph-container,
        .section .knowledge-graph-container,
        section .knowledge-graph-container,
        .knowledge-graph-container {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
        }
    }
}

@media screen and (max-width: 768px) and (orientation: landscape) {
    .knowledge-graph .mobile-knowledge-view,
    .section .mobile-knowledge-view,
    section .mobile-knowledge-view,
    .mobile-knowledge-view {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .knowledge-graph .rotate-phone-prompt,
    .section .rotate-phone-prompt,
    section .rotate-phone-prompt,
    .rotate-phone-prompt {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .knowledge-graph .knowledge-graph-container,
    .section .knowledge-graph-container,
    section .knowledge-graph-container,
    .knowledge-graph-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
}

@media (max-width: 480px) {
    /* Extra Small Mobile Optimization */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .logo-subtitle {
        display: none;
    }
    
    /* Mobile Experience Timeline */
    .timeline-item {
        padding: 1.5rem 1rem;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .timeline-date {
        font-size: 0.875rem;
    }
    
    /* Mobile ML Demo */
    .ml-demo-grid {
        grid-template-columns: 1fr;
    }
    
    .demo-card {
        padding: 1.5rem;
    }
    
    /* Mobile Tables */
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    /* Mobile Code Window */
    .code-window {
        font-size: 0.75rem;
    }
    
    .code-content {
        padding: 1rem;
    }
    
    /* Mobile Graph Controls */
    .graph-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .control-group select {
        width: 100%;
    }
    
    /* Mobile About Stats */
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .stat {
        padding: 1rem;
    }
    
    /* Mobile Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

/* Print styles */
@media print {
    .navbar,
    .hero-visual,
    .contact-form,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Case Studies Section */
.case-studies {
    background: var(--bg-secondary);
    padding: 5rem 0;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: -0.5rem;
    margin-bottom: 3rem;
}

.case-studies-grid {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
}

.case-study-card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.case-study-card h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.case-study-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.input-section, .output-section {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
}

.input-section h4, .output-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.analyze-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.analyze-btn:hover {
    background: var(--primary-dark);
}

.results-container {
    min-height: 200px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--surface-color);
    border-radius: 4px;
}

.result-item span:first-child {
    font-weight: 500;
    color: var(--text-secondary);
}

.result-item span:last-child {
    font-weight: 600;
    color: var(--primary-color);
}

#risk-factors {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.risk-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.risk-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.5s ease;
    width: 0%;
}

.risk-category {
    margin-bottom: 1rem;
}

.risk-category span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.data-upload {
    margin-top: 1rem;
}

.data-upload textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-top: 1rem;
    resize: vertical;
}

.anomaly-stats {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: 6px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.stat-item:last-child {
    margin-bottom: 0;
}

/* Canvas styling */
canvas {
    margin-top: 1rem;
    border-radius: 6px;
    background: var(--surface-color);
}

/* Responsive design for case studies */
@media (max-width: 1024px) {
    .demo-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .case-study-card {
        padding: 1.5rem;
    }
    
    .input-section, .output-section {
        padding: 1rem;
    }
}

/* Dashboard Showcase Section */
.dashboard-showcase {
    background: var(--surface-color);
    padding: 5rem 0;
}

.dashboard-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.preview-content h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.preview-content > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.dashboard-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-item svg {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.feature-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.feature-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-btn svg {
    width: 20px;
    height: 20px;
}

.cta-btn.primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.cta-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.cta-btn.secondary {
    background: var(--surface-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cta-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Browser Mockup */
.browser-mockup {
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-10deg);
    transition: transform 0.3s ease;
}

.dashboard-preview:hover .browser-mockup {
    transform: perspective(1000px) rotateY(0deg);
}

.browser-bar {
    background: #f3f4f6;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.browser-dots {
    display: flex;
    gap: 0.5rem;
}

.browser-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: block;
}

.browser-dots span:nth-child(1) {
    background: #ef4444;
}

.browser-dots span:nth-child(2) {
    background: #f59e0b;
}

.browser-dots span:nth-child(3) {
    background: #10b981;
}

.browser-url {
    flex: 1;
    text-align: center;
    background: var(--surface-color);
    padding: 0.25rem 1rem;
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.browser-content img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive design for dashboard showcase */
@media (max-width: 1024px) {
    .dashboard-preview {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .browser-mockup {
        transform: none;
    }
}

@media (max-width: 768px) {
    .dashboard-features {
        grid-template-columns: 1fr;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
    
    .cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Knowledge Graph Section */
.knowledge-graph {
    background: var(--bg-gradient-3);
    color: var(--text-primary);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

/* KNOWLEDGE GRAPH DISPLAY RULES - SIMPLIFIED */

/* Desktop (default) */
.rotate-phone-prompt,
.mobile-knowledge-view {
    display: none;
}

.knowledge-graph-container {
    display: block;
}

/* Mobile Portrait */
@media screen and (max-width: 768px) and (orientation: portrait) {
    .rotate-phone-prompt {
        display: block !important;
    }
    
    .mobile-knowledge-view {
        display: none !important;
    }
    
    .knowledge-graph-container {
        display: none !important;
    }
}

/* Mobile Landscape */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .rotate-phone-prompt {
        display: none !important;
    }
    
    .mobile-knowledge-view {
        display: block !important;
    }
    
    .knowledge-graph-container {
        display: none !important;
    }
}

.knowledge-graph-container {
    position: relative;
    margin: 3rem 0;
    padding: 0;
    overflow: visible;
}

.neural-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
}

.data-point {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.8) 0%, rgba(16, 185, 129, 0.3) 70%, transparent 100%);
    border-radius: 50%;
    animation: dataPointFloat 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes dataPointFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-20px) scale(1.2);
        opacity: 1;
    }
}

.graph-container {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin: 2rem 0;
}

.graph-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    padding: 0;
}

#zoom-level {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-group label {
    font-weight: 500;
    color: var(--text-secondary);
}

.control-group select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--surface-color);
    font-size: 0.875rem;
    cursor: pointer;
}

.graph-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.graph-btn:hover {
    background: var(--primary-dark);
}

.graph-wrapper {
    position: relative;
    margin-bottom: 2rem;
}

#knowledge-graph-canvas {
    width: 100%;
    height: 600px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: grab;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
}

#knowledge-graph-canvas:active {
    cursor: grabbing;
}

.graph-legend {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    color: rgba(255, 255, 255, 0.8);
}


.legend-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: scale(1.02);
}

.legend-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.legend-color.audit {
    background: #3b82f6;
}

.legend-color.technical {
    background: #10b981;
}

.legend-color.projects {
    background: #f59e0b;
}

.legend-color.industry {
    background: #8b5cf6;
}

.legend-color.soft {
    background: #f59e0b;
}

/* Knowledge Graph Tooltip */
.graph-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    max-width: 250px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    animation: tooltipFadeIn 0.2s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--primary-color);
}

.tooltip-category {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.tooltip-description {
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}

.node-details {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    min-height: 120px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.node-details:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.node-details h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.node-details p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

#node-connections {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.connection-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
}

.connection-tag:hover {
    background: rgba(59, 130, 246, 0.3);
    color: #dbeafe;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.graph-insights {
    margin-top: 3rem;
}

.graph-insights h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

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

.insight-item {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insight-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.insight-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

/* Animation classes for graph nodes */
.node-highlighted {
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.6));
}

.node-dimmed {
    opacity: 0.3;
}

.edge-highlighted {
    stroke-width: 3;
    stroke: #3b82f6;
}

.edge-dimmed {
    opacity: 0.2;
}

/* Neural Network Background Animation */
.neural-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.02) 0%, transparent 70%);
}

.neural-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 800px 600px at 50% 50%, 
        rgba(59, 130, 246, 0.03) 0%, 
        transparent 40%),
        radial-gradient(ellipse 400px 300px at 20% 80%, 
        rgba(139, 92, 246, 0.02) 0%, 
        transparent 40%),
        radial-gradient(ellipse 600px 400px at 80% 20%, 
        rgba(16, 185, 129, 0.02) 0%, 
        transparent 40%);
    animation: neuralGlow 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes neuralGlow {
    0%, 100% { opacity: 0.5; }
    33% { opacity: 0.8; }
    66% { opacity: 0.3; }
}

/* Enhanced hero section with neural effects */
.hero-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 45deg, 
        transparent 0deg,
        rgba(59, 130, 246, 0.1) 30deg,
        transparent 60deg,
        rgba(139, 92, 246, 0.08) 90deg,
        transparent 120deg,
        rgba(16, 185, 129, 0.06) 150deg,
        transparent 180deg,
        rgba(245, 158, 11, 0.04) 210deg,
        transparent 240deg,
        rgba(59, 130, 246, 0.05) 270deg,
        transparent 300deg,
        rgba(139, 92, 246, 0.03) 330deg,
        transparent 360deg);
    animation: neuralSpin 30s linear infinite;
    border-radius: 50%;
    z-index: -1;
}

@keyframes neuralSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Quantum particle effects */
.quantum-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(59, 130, 246, 0.8);
    border-radius: 50%;
    animation: quantumMove 20s linear infinite;
    box-shadow: 0 0 4px rgba(59, 130, 246, 0.6);
}

@keyframes quantumMove {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    25% {
        transform: translate(100px, -50px) scale(1.5);
        opacity: 0.8;
    }
    50% {
        transform: translate(-80px, -120px) scale(0.8);
        opacity: 0.6;
    }
    75% {
        transform: translate(150px, -80px) scale(1.2);
        opacity: 0.9;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(0, -200px) scale(0.5);
        opacity: 0;
    }
}

/* Neural pulse effects for sections */
.section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: titlePulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-color);
}

@keyframes titlePulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-50%) scale(1.5);
        opacity: 1;
    }
}

.section-title {
    position: relative;
    padding-left: 30px;
}

/* Neural connection lines between sections */
.section-connector {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 50px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(59, 130, 246, 0.3) 20%, 
        rgba(59, 130, 246, 0.6) 50%, 
        rgba(59, 130, 246, 0.3) 80%, 
        transparent 100%);
    transform: translateX(-50%);
    animation: connectorFlow 3s ease-in-out infinite;
}

@keyframes connectorFlow {
    0%, 100% {
        background-position: 0% 0%;
        opacity: 0.5;
    }
    50% {
        background-position: 0% 100%;
        opacity: 1;
    }
}

/* Enhanced knowledge graph effects */
.knowledge-graph-container::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 15%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 60%);
    border-radius: 50%;
    animation: knowledgePulse 8s ease-in-out infinite;
}

@keyframes knowledgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Responsive neural effects */
@media (max-width: 768px) {
    .neural-background::after {
        background: radial-gradient(ellipse 400px 300px at 50% 50%, 
            rgba(59, 130, 246, 0.02) 0%, 
            transparent 40%);
    }
    
    .quantum-particle {
        width: 1px;
        height: 1px;
    }
    
    .neural-node {
        width: 2px;
        height: 2px;
    }
    
    .data-point {
        width: 2px;
        height: 2px;
    }
    
    /* Responsive legend for mobile */
    .graph-legend {
        grid-template-columns: repeat(2, 1fr);
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .legend-item {
        font-size: 0.8rem;
        padding: 0.4rem;
        gap: 0.4rem;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .graph-legend {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }
    
    .legend-item {
        font-size: 0.75rem;
        padding: 0.3rem;
    }
}

/* Canvas and ML Demo Responsive Styles */
@media (max-width: 768px) {
    /* ML Demo Responsive */
    .ml-demo {
        padding: 3rem 0;
    }
    
    .demo-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .demo-card {
        padding: 1.5rem;
    }
    
    /* Canvas Elements */
    canvas {
        max-width: 100% !important;
        height: auto !important;
        touch-action: manipulation;
    }
    
    /* Gauge Responsive */
    .gauge-container {
        max-width: 250px;
        margin: 0 auto;
    }
    
    /* Results Table */
    .results-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .results-table table {
        min-width: 300px;
    }
}

/* Performance optimization */
@media (prefers-reduced-motion: reduce) {
    .neural-background,
    .neural-node,
    .neural-connection,
    .neural-particle,
    .quantum-particle {
        animation: none;
    }
}

/* FINAL MOBILE KNOWLEDGE GRAPH RULES - Override everything above */
@media screen and (max-width: 768px) {
    /* Portrait orientation */
    @media (orientation: portrait) {
        #knowledge-graph .rotate-phone-prompt,
        .knowledge-graph .rotate-phone-prompt {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
            position: relative !important;
            z-index: 10 !important;
        }
        
        #knowledge-graph .mobile-knowledge-view,
        .knowledge-graph .mobile-knowledge-view {
            display: none !important;
        }
        
        #knowledge-graph .knowledge-graph-container,
        .knowledge-graph .knowledge-graph-container {
            display: none !important;
        }
    }
    
    /* Landscape orientation */
    @media (orientation: landscape) {
        #knowledge-graph .mobile-knowledge-view,
        .knowledge-graph .mobile-knowledge-view {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        #knowledge-graph .rotate-phone-prompt,
        .knowledge-graph .rotate-phone-prompt {
            display: none !important;
        }
        
        #knowledge-graph .knowledge-graph-container,
        .knowledge-graph .knowledge-graph-container {
            display: none !important;
        }
    }
}
