:root {
    --primary: #0b3d91;
    --secondary: #00a8cc;
    --dark: #07152e;
    --background: #f4f8fc;
    --white: #ffffff;
    --text: #233044;
    --muted: #667085;
    --border: #dce5ef;
    --success: #16803c;
    --danger: #c62828;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
}

.container {
    width: min(1100px, 92%);
    margin: auto;
}


/* HERO */

.hero {
    background:
        radial-gradient(circle at top right, rgba(0, 168, 204, 0.35), transparent 35%),
        linear-gradient(135deg, #061a40, #0b3d91);
    color: var(--white);
    text-align: center;
    padding: 90px 20px;
}

.eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 30px;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: clamp(2.3rem, 6vw, 4.5rem);
    margin: 20px 0 10px;
}

.hero-text {
    max-width: 700px;
    margin: auto;
    font-size: 1.15rem;
    opacity: 0.9;
}


/* BUTTON */

.primary-btn {
    border: none;
    background: var(--secondary);
    color: white;
    padding: 13px 24px;
    margin-top: 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.2s, opacity 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}


/* NAVIGATION */

.navbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 14px;
    overflow-x: auto;
}

.navbar a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}


/* SECTIONS */

main {
    padding: 45px 0;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 35px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(20, 45, 80, 0.06);
}

.card h2 {
    color: var(--primary);
    margin-top: 5px;
}

.section-number {
    color: var(--secondary);
    font-weight: 800;
    letter-spacing: 2px;
}

.highlight-box,
.example-box {
    padding: 20px;
    border-radius: 14px;
    margin-top: 20px;
}

.highlight-box {
    background: #eaf9fd;
    border-left: 5px solid var(--secondary);
}

.example-box {
    background: #f2f6ff;
    border-left: 5px solid var(--primary);
}


/* NETWORK DEMO */

.network-demo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 40px 0 10px;
}

.device {
    text-align: center;
    font-size: 3rem;
}

.device span {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
}

.connection {
    min-width: 160px;
    text-align: center;
}

.signal {
    display: block;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--primary),
        var(--secondary),
        var(--primary)
    );
    border-radius: 20px;
}


/* GRID */

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 25px;
}

.info-box {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: transform 0.2s;
}

.info-box:hover {
    transform: translateY(-4px);
}

.info-box span {
    font-size: 2rem;
}

.info-box h3 {
    margin-bottom: 5px;
    color: var(--primary);
}


/* COMMUNICATION MODEL */

.communication-model {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 35px 0;
}

.model-step {
    flex: 1;
    text-align: center;
}

.circle {
    width: 55px;
    height: 55px;
    margin: auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 800;
}

.arrow {
    font-size: 2rem;
    color: var(--secondary);
}


/* COMPONENTS */

.components-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.component {
    border: 1px solid var(--border);
    background: #f9fbfd;
    padding: 20px 10px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 2rem;
    transition: 0.2s;
}

.component:hover {
    border-color: var(--secondary);
    transform: translateY(-4px);
}

.component span {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text);
}

.component-info {
    margin-top: 20px;
    padding: 20px;
    background: #f1f7ff;
    border-radius: 12px;
    min-height: 70px;
}


/* NETWORK TYPES */

.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.network-type {
    padding: 20px;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff, #eef7fb);
    border: 1px solid var(--border);
}

.network-type h3 {
    color: var(--secondary);
    font-size: 1.7rem;
    margin: 0;
}


/* PROTOCOL */

.protocol-demo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 35px 0;
}

.person {
    font-size: 3rem;
    text-align: center;
}

.person span {
    display: block;
    font-size: 0.9rem;
    font-weight: bold;
}

.protocol-message {
    text-align: center;
    padding: 18px;
    background: #f2f6ff;
    border-radius: 15px;
}


/* SIMULATOR */

.simulator-section {
    text-align: center;
}

.simulator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 40px 0;
}

.sim-device {
    font-size: 3rem;
    text-align: center;
}

.sim-device p {
    font-size: 1rem;
    margin: 5px;
    font-weight: bold;
}

.network-line {
    position: relative;
    width: 45%;
    height: 6px;
    background: var(--border);
    border-radius: 20px;
}

.packet {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
}

.packet.move {
    animation: transmit 2.5s ease-in-out forwards;
}

@keyframes transmit {
    from {
        left: 0;
    }

    to {
        left: 100%;
    }
}

.status {
    font-weight: 700;
    color: var(--muted);
}


/* QUIZ */

.quiz-section {
    text-align: center;
}

.quiz-question {
    max-width: 700px;
    margin: 20px auto;
    font-size: 1.1rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quiz-btn {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    font-weight: 800;
}

.quiz-btn:hover {
    background: #eef7fb;
}

.quiz-result {
    min-height: 40px;
    margin-top: 20px;
    font-weight: 700;
}

.correct {
    color: var(--success);
}

.incorrect {
    color: var(--danger);
}


/* REFLECTION */

.reflection {
    background:
        linear-gradient(135deg, #07152e, #0b3d91);
    color: white;
}

.reflection h2 {
    color: white;
}

blockquote {
    font-size: 1.2rem;
    font-style: italic;
    border-left: 4px solid var(--secondary);
    padding-left: 20px;
}


/* FOOTER */

footer {
    background: var(--dark);
    color: #d7e0ec;
    text-align: center;
    padding: 40px 0;
}

.footer-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
}

.copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}


/* RESPONSIVE */

@media (max-width: 800px) {

    .grid {
        grid-template-columns: 1fr;
    }

    .components-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }

    .communication-model {
        flex-direction: column;
    }

    .arrow {
        transform: rotate(90deg);
    }

    .quiz-options {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 500px) {

    .hero {
        padding: 70px 15px;
    }

    .card {
        padding: 22px;
    }

    .network-demo {
        gap: 12px;
    }

    .connection {
        min-width: 70px;
    }

    .timeline {
        grid-template-columns: 1fr;
    }

    .components-grid {
        grid-template-columns: 1fr 1fr;
    }

    .simulator {
        transform: scale(0.85);
    }

}