:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #ec4899;

    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --gradient-main: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0) 50%);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Background Effects */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.08) 0%, transparent 25%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.25rem 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    color: var(--primary);
    font-size: 1.8rem;
}

.highlight {
    color: var(--primary);
}

.nav-links {
    display: none;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        gap: 2rem;
    }
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
}

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

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-bar {
    display: none;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 960px) {
    .search-bar {
        display: flex;
    }
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    margin-left: 0.5rem;
    outline: none;
    width: 120px;
    font-family: var(--font-body);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

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

@media (min-width: 960px) {
    .hero-content {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 2rem;
    color: var(--secondary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-text h1 {
        font-size: 4rem;
    }
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.stats {
    display: flex;
    gap: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .count {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-item .label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Hero Content Visual (Code Card) */
.hero-visual {
    position: relative;
    z-index: 1;
}

.code-card {
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.code-card:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.window-controls {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.red {
    background: #ef4444;
}

.yellow {
    background: #eab308;
}

.green {
    background: #22c55e;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
}

.keyword {
    color: #c4b5fd;
}

.protocol {
    color: #fb7185;
}

.header {
    color: #94a3b8;
}

.comment {
    color: #475569;
}

.success {
    color: #4ade80;
}

.string {
    color: #86efac;
}

.key {
    color: #93c5fd;
}

.decorative-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.5;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -50px;
    right: -50px;
    animation: float 10s infinite alternate;
}

.blob-2 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    bottom: -30px;
    left: -30px;
    animation: float 8s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 40px);
    }
}

/* Features */
.features {
    padding: 6rem 0;
    margin-top: 5rem;
}

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

.center {
    text-align: center;
}

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

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-muted);
}

/* Learning Paths */
.paths {
    padding: 6rem 0;
}

.path-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.path-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.path-card:hover {
    background: #252f44;
}

.path-meta {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.path-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.path-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.arrow {
    margin-top: auto;
    color: var(--primary);
    font-weight: bold;
    transition: transform 0.2s;
}

.path-card:hover .arrow {
    transform: translateX(5px);
}

.highlight-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Newsletter */
.newsletter {
    padding: 6rem 0;
    margin-top: 4rem;
}

.newsletter-box {
    background: linear-gradient(to right, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .newsletter-box {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding: 4rem;
    }
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
}

.subscribe-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #334155;
    color: white;
    outline: none;
}

.subscribe-form input:focus {
    border-color: var(--primary);
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5rem 0 2rem;
    background: #0b1120;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
    font-size: 0.9rem;
}

/* Utilities for visual polish */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Curriculum Section */
.curriculum {
    padding: 6rem 0;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.chapter-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.chapter-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

.chapter-num {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    position: absolute;
    top: 0;
    right: 1rem;
    pointer-events: none;
    transition: color 0.3s;
}

.chapter-card:hover .chapter-num {
    color: rgba(255, 255, 255, 0.1);
}

.chapter-icon {
    font-size: 2rem;
}

.chapter-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.chapter-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Protocols Section */
.protocols {
    padding: 6rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.protocols-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.protocol-box {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    width: 180px;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.protocol-box:hover {
    transform: scale(1.05);
    background: #1e293b;
}

.proto-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.proto-badge.rest {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.proto-badge.graphql {
    background: rgba(236, 72, 153, 0.2);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.3);
}

.proto-badge.soap {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.proto-badge.socket {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.proto-badge.grpc {
    background: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.proto-badge.sse {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}


/* Curriculum Grouping */
.curriculum-group {
    margin-bottom: 3rem;
}

.mt-large {
    margin-top: 4rem;
}

.group-label {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 2rem;
    padding-left: 0.5rem;
    border-left: 4px solid var(--accent);
}

/* Protocols Grid */
.protocols-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    justify-content: center;
}

@media (min-width: 900px) {
    .protocols-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
        margin: 0 auto;
    }
}

/* Styles for the protocol box need to be full width in the grid cell */
.protocol-box {
    width: 100%;
}

/* FAQ Section */
.faq {
    padding: 6rem 0;
}

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

.faq-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s;
}

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

.faq-card h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.faq-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
}

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

/* Example Section */
.example-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.example-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 960px) {
    .example-container {
        grid-template-columns: 1fr 1fr;
    }
}

.badge-sm {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 2rem;
    border: 1px solid rgba(74, 222, 128, 0.2);
    margin-bottom: 1.5rem;
}

.example-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.example-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.code-preview {
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.code-preview pre {
    padding: 1.5rem;
    color: #e2e8f0;
    white-space: pre-wrap;
}