* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --dark-bg: #0f172a;
    --darker-bg: #020617;
    --light-bg: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #334155;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform:  capitalize
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.cta-button {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.hero-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.network-node {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

.node-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.node-2 {
    top: 60%;
    left: 20%;
    animation-delay: 0.5s;
}

.node-3 {
    top: 30%;
    right: 15%;
    animation-delay: 1s;
}

.node-4 {
    bottom: 20%;
    right: 25%;
    animation-delay: 1.5s;
}

/* Sections */
.section {
    padding: 6rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section-alt {
    background: var(--darker-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* OSI Model */
.osi-layers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.osi-layer {
    display: flex;
    align-items: center;
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.osi-layer:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.3);
}

.layer-number {
    font-size: 2rem;
    font-weight: bold;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    margin-right: 1.5rem;
}

.layer-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.layer-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.layer-examples {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Protocol Grid */
.protocol-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.protocol-card {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.protocol-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.protocol-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.protocol-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}


/* Topology Grid */
.topology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.topology-card {
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.topology-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.topology-visual {
    position: relative;
    height: 150px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Star Topology */
.star-topology {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 10px;
}

.star-topology .topo-center {
    grid-column: 2;
    grid-row: 2;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-color);
}

.star-topology .topo-node {
    width: 25px;
    height: 25px;
    background: var(--accent-color);
    border-radius: 50%;
    margin: auto;
}

.star-topology .topo-node:nth-child(2) { grid-column: 2; grid-row: 1; }
.star-topology .topo-node:nth-child(3) { grid-column: 3; grid-row: 2; }
.star-topology .topo-node:nth-child(4) { grid-column: 2; grid-row: 3; }
.star-topology .topo-node:nth-child(5) { grid-column: 1; grid-row: 2; }

/* Bus Topology */
.bus-topology {
    flex-direction: column;
    gap: 20px;
}

.bus-topology .topo-backbone {
    width: 80%;
    height: 5px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.bus-topology .topo-node {
    width: 25px;
    height: 25px;
    background: var(--accent-color);
    border-radius: 50%;
    position: absolute;
    top: 50%;
}

.bus-topology .topo-node:nth-child(2) { left: 15%; }
.bus-topology .topo-node:nth-child(3) { left: 40%; }
.bus-topology .topo-node:nth-child(4) { left: 60%; }
.bus-topology .topo-node:nth-child(5) { left: 85%; }

/* Ring Topology */
.ring-topology {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ring-topology::before {
    content: '';
    width: 100px;
    height: 100px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.ring-topology .topo-node {
    width: 25px;
    height: 25px;
    background: var(--accent-color);
    border-radius: 50%;
    position: absolute;
}

.ring-topology .topo-node:nth-child(1) { top: 10%; left: 50%; transform: translateX(-50%); }
.ring-topology .topo-node:nth-child(2) { right: 20%; top: 50%; transform: translateY(-50%); }
.ring-topology .topo-node:nth-child(3) { bottom: 10%; left: 50%; transform: translateX(-50%); }
.ring-topology .topo-node:nth-child(4) { left: 20%; top: 50%; transform: translateY(-50%); }

/* Mesh Topology */
.mesh-topology {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mesh-topology .topo-node {
    width: 25px;
    height: 25px;
    background: var(--accent-color);
    border-radius: 50%;
    position: absolute;
}

.mesh-topology .topo-node:nth-child(1) { top: 20%; left: 30%; }
.mesh-topology .topo-node:nth-child(2) { top: 20%; right: 30%; }
.mesh-topology .topo-node:nth-child(3) { bottom: 20%; left: 30%; }
.mesh-topology .topo-node:nth-child(4) { bottom: 20%; right: 30%; }

.topology-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}


/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section li {
    padding: 0.3rem 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--dark-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .protocol-grid,
    .topology-grid,
    .devices-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .section {
        padding: 4rem 1rem;
    }
}

