:root {
    --bg: #0b0f14;
    --bg-soft: #11161d;
    --bg-card: #151c25;
    --border: #232d3a;
    --border-soft: #1b2430;
    --text: #d4dce6;
    --text-muted: #8a97a6;
    --heading: #f1f5f9;
    --accent: #22d3ee;
    --accent-soft: #0e7490;
    --green: #34d399;
    --yellow: #fbbf24;
    --red: #f87171;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    font-family: var(--sans);
    background:
        radial-gradient(1200px 500px at 80% -10%, rgba(14, 116, 144, 0.18), transparent 60%),
        radial-gradient(900px 400px at 10% 0%, rgba(52, 211, 153, 0.08), transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

main {
    flex: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--green);
}

img {
    max-width: 100%;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 15, 20, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--heading);
    font-weight: 800;
    font-size: 1.15rem;
    white-space: nowrap;
}

.brand:hover {
    color: var(--heading);
}

.brand-icon {
    width: 26px;
    height: 26px;
    color: var(--accent);
    flex-shrink: 0;
}

.brand-text em {
    font-style: normal;
    color: var(--accent);
}

.site-nav {
    display: flex;
    gap: 1.6rem;
    align-items: center;
}

.site-nav a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.35rem 0.1rem;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover {
    color: var(--heading);
}

.site-nav a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero ---------- */
.hero {
    padding: 5.5rem 0 4rem;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--green);
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.25);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    color: var(--heading);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero h1 .accent {
    color: var(--accent);
}

.hero .lead {
    max-width: 640px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.terminal {
    max-width: 760px;
    margin: 2.5rem auto 0;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: left;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: var(--bg-card);
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
}

.terminal-bar span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.terminal-bar .t-red { background: #ff5f56; }
.terminal-bar .t-yellow { background: #ffbd2e; }
.terminal-bar .t-green { background: #27c93f; }

.terminal-bar .t-title {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 1.4rem 1.6rem;
    font-family: var(--mono);
    font-size: 0.88rem;
    line-height: 1.9;
    white-space: pre-wrap;
    overflow-x: auto;
}

.terminal-body .prompt { color: var(--green); }
.terminal-body .cmd { color: var(--heading); }
.terminal-body .out { color: var(--text-muted); }
.terminal-body .hl { color: var(--yellow); }
.terminal-body .ok { color: var(--green); }
.terminal-body .cursor {
    display: inline-block;
    width: 8px;
    height: 1.1em;
    background: var(--accent);
    vertical-align: text-bottom;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ---------- Section titles ---------- */
.section {
    padding: 4rem 0;
}

.section-head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--heading);
    margin-bottom: 0.5rem;
}

.section-head p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.section-head .tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.8rem;
}

/* ---------- Cards ---------- */
.grid {
    display: grid;
    gap: 1.25rem;
}

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

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.6rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-soft);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(34, 211, 238, 0.12);
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--heading);
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

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

.tutorial-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tutorial-card .meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-muted);
}

.chip.kat-linux { color: #f472b6; border-color: rgba(244, 114, 182, 0.35); background: rgba(244, 114, 182, 0.08); }
.chip.kat-web-server { color: #60a5fa; border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.08); }
.chip.kat-keamanan { color: #f87171; border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); }
.chip.kat-virtualisasi { color: #a78bfa; border-color: rgba(167, 139, 250, 0.35); background: rgba(167, 139, 250, 0.08); }
.chip.kat-database { color: #34d399; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); }
.chip.kat-monitoring { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.08); }

.chip.tk { color: var(--text-muted); }

.tutorial-card h3 {
    margin-bottom: 0;
}

.tutorial-card .read-more {
    margin-top: auto;
    padding-top: 0.6rem;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.tutorial-card .read-more .arrow {
    transition: transform 0.15s ease;
}

.tutorial-card:hover .read-more .arrow {
    transform: translateX(3px);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--heading);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.btn:hover {
    border-color: var(--accent-soft);
    color: var(--heading);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #06222b;
}

.btn-primary:hover {
    background: #67e8f9;
    border-color: #67e8f9;
    color: #06222b;
}

.btn-row {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Page hero (tutorial) ---------- */
.page-hero {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
}

.page-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: var(--heading);
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Filter ---------- */
.filters {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-btn {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    border-color: var(--accent-soft);
    color: var(--heading);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #06222b;
}

/* ---------- Tutorial detail ---------- */
.article {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.article .meta-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.article h1 {
    color: var(--heading);
    font-size: clamp(1.7rem, 3.5vw, 2.5rem);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.article .deskripsi {
    color: var(--text-muted);
    font-size: 1.08rem;
    margin-bottom: 2rem;
}

.article .prose {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem 2.5rem;
}

.article .prose h2 {
    color: var(--heading);
    font-size: 1.45rem;
    margin: 2.2rem 0 0.9rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-soft);
    scroll-margin-top: 90px;
}

.article .prose h2:first-child {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

.article .prose p {
    margin-bottom: 1rem;
}

.article .prose ul,
.article .prose ol {
    margin: 0 0 1.2rem 1.4rem;
}

.article .prose li {
    margin-bottom: 0.45rem;
}

.article .prose li::marker {
    color: var(--accent);
}

.article .prose code {
    font-family: var(--mono);
    font-size: 0.85em;
    background: rgba(34, 211, 238, 0.1);
    color: #7dd3fc;
    padding: 0.15em 0.4em;
    border-radius: 6px;
}

.article .prose pre {
    background: #0a0e13;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    overflow-x: auto;
    margin: 1.2rem 0;
    position: relative;
}

.article .prose pre code {
    background: none;
    padding: 0;
    color: #cbd5e1;
    font-size: 0.85rem;
    line-height: 1.75;
    white-space: pre;
}

.article .prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2rem 0;
    font-size: 0.92rem;
}

.article .prose th {
    text-align: left;
    color: var(--heading);
    background: var(--bg-soft);
}

.article .prose th,
.article .prose td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.9rem;
}

.article .prose strong {
    color: var(--heading);
}

.article .note {
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: rgba(34, 211, 238, 0.06);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin: 1.4rem 0;
    font-size: 0.95rem;
}

.article .note.warning {
    border-left-color: var(--yellow);
    background: rgba(251, 191, 36, 0.07);
}

.article .note strong {
    color: var(--heading);
}

.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.article-nav a {
    max-width: 320px;
}

.article-nav .dir { color: var(--text-muted); font-size: 0.78rem; display: block; }
.article-nav .ttl { color: var(--heading); font-weight: 600; }
.article-nav a:hover .ttl { color: var(--accent); }

/* ---------- Komunitas ---------- */
.comm-hero {
    text-align: center;
    padding: 3.5rem 0 2.5rem;
}

.comm-hero h1 {
    color: var(--heading);
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    margin-bottom: 0.5rem;
}

.comm-hero p {
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto;
}

.platform-card .card-icon {
    font-size: 1.6rem;
}

.platform-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.platform-card .stats {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--green);
    margin-bottom: 0.8rem;
}

.platform-card .btn {
    margin-top: 0.6rem;
    font-size: 0.88rem;
    padding: 0.6rem 1.2rem;
}

/* ---------- Kontak ---------- */
.form-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--heading);
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0.95rem;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.95rem;
    transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-soft);
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-status {
    padding: 0.9rem 1.1rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(52, 211, 153, 0.1);
    border: 1px solid rgba(52, 211, 153, 0.35);
    color: var(--green);
}

.form-status.error {
    display: block;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: var(--red);
}

.info-grid {
    margin-top: 2.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    padding-top: 2.8rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-top: 0.8rem;
    max-width: 34ch;
}

.footer-nav,
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav h3,
.footer-social h3 {
    color: var(--heading);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
}

.footer-nav a,
.footer-social a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-nav a:hover,
.footer-social a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.2rem 0;
    border-top: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.terminal-note {
    font-family: var(--mono);
    font-size: 0.8rem;
}

.terminal-note .prompt {
    color: var(--green);
}

.heart {
    color: var(--red);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg-soft);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .site-nav.open {
        max-height: 260px;
    }

    .site-nav a {
        padding: 0.9rem 1.5rem;
        border-bottom: 1px solid var(--border-soft);
    }

    .site-nav a.active {
        border-bottom-width: 1px;
        border-bottom-color: var(--border-soft);
        background: rgba(34, 211, 238, 0.06);
    }

    .grid.cols-2,
    .grid.cols-3,
    .grid.cols-4 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }

    .article .prose {
        padding: 1.6rem 1.2rem;
    }

    .hero {
        padding: 3.5rem 0 2.5rem;
    }
}