:root {
    --bg-color: #050810;
    --text-color: #e2e8f0;
    --accent-primary: #00f0ff;
    --accent-secondary: #8a2be2;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

canvas#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Utilities */
h1, h2, h3, h4, h5, h6, .logo {
    font-family: var(--font-heading);
}

.highlight {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

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

.primary-btn {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border: none;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.primary-btn:hover {
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
    transform: translateY(-2px);
}

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

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

.outline-btn {
    background: transparent;
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 30px;
    padding: 0.8rem 2.5rem;
}

.outline-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-color);
}

.section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(5, 8, 16, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav {
    display: flex;
    gap: 2rem;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--accent-primary);
    transition: var(--transition);
}

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

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

.yt-btn {
    background: #ff0000;
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition);
}

.yt-btn:hover {
    background: #cc0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

/* Mobile Nav */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 99;
    transition: left 0.4s ease;
}

.mobile-nav.open {
    left: 0;
}

.mobile-link {
    font-size: 2rem;
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    padding-top: 5rem;
}

.hero-content {
    max-width: 800px;
    animation: fadeIn 1.5s ease;
    z-index: 10;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #cbd5e1;
}

.features-list {
    list-style: none;
    margin-top: 2rem;
}

.features-list li {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-primary);
}

.info-panel {
    text-align: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.info-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.info-panel h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.info-panel p {
    color: #94a3b8;
    margin-bottom: 2rem;
}

.youtube-link-btn {
    background: #ff0000;
    color: white;
    border: none;
}

.youtube-link-btn:hover {
    background: #cc0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* Videos Section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.video-card {
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.3);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.video-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.video-info p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.center-btn-container {
    text-align: center;
}

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

.resource-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.2);
    border-color: rgba(138, 43, 226, 0.4);
}

.resource-tag {
    align-self: flex-start;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.material-tag {
    background: rgba(138, 43, 226, 0.1);
    color: var(--accent-secondary);
    border-color: rgba(138, 43, 226, 0.3);
}

.resource-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.resource-card p {
    color: #94a3b8;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: gap 0.3s ease;
    gap: 5px;
}

.resource-card:hover .read-more {
    gap: 10px;
}

/* Footer */
.footer {
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
    border-radius: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: #94a3b8;
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.link-group h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.link-group a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: var(--transition);
}

.link-group a:hover {
    color: var(--accent-primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: #64748b;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glitch effect on hover for title highlight */
.text-glitch {
    position: relative;
}

.hero-title:hover .text-glitch::before,
.hero-title:hover .text-glitch::after {
    content: 'ComputeNest';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}

.hero-title:hover .text-glitch::before {
    left: 2px;
    text-shadow: -2px 0 red;
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

.hero-title:hover .text-glitch::after {
    left: -2px;
    text-shadow: -2px 0 blue;
    animation: glitch-anim2 3s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(24px, 9999px, 86px, 0); }
    20% { clip: rect(65px, 9999px, 12px, 0); }
    40% { clip: rect(10px, 9999px, 58px, 0); }
    60% { clip: rect(89px, 9999px, 32px, 0); }
    80% { clip: rect(45px, 9999px, 75px, 0); }
    100% { clip: rect(12px, 9999px, 95px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(74px, 9999px, 16px, 0); }
    20% { clip: rect(35px, 9999px, 82px, 0); }
    40% { clip: rect(50px, 9999px, 28px, 0); }
    60% { clip: rect(9px, 9999px, 52px, 0); }
    80% { clip: rect(85px, 9999px, 15px, 0); }
    100% { clip: rect(32px, 9999px, 65px, 0); }
}

/* Responsive */
@media (max-width: 900px) {
    .nav, .header .yt-btn {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .section {
        padding: 4rem 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

/* Single Page Styles (e.g., n8n Chatbot Workflow) */
.page-single {
    padding-top: 8rem;
}

.post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeIn 1s ease;
}

.post-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.post-meta {
    color: #94a3b8;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.post-video {
    margin-bottom: 3rem;
    padding: 1rem;
    animation: fadeIn 1.2s ease;
}

.post-body {
    padding: 3rem;
    animation: fadeIn 1.4s ease;
    font-size: 1.1rem;
    color: #cbd5e1;
}

.post-body h2 {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    margin-top: 2rem;
}

.post-body h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    color: #fff;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.download-box {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.download-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    color: #fff;
}

.download-info p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
}

@media (max-width: 600px) {
    .page-single {
        padding-top: 6rem;
    }
    .post-title {
        font-size: 2.2rem;
    }
    .post-body {
        padding: 1.5rem;
    }
    .download-box {
        flex-direction: column;
        text-align: center;
    }
}
