/* ============================================
   COC Komputer — Premium Design System 2026
   Modern, User-Friendly, Dark + Orange Accent
   ============================================ */

/* === CSS Variables === */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2333;
    --bg-card-hover: #222d3f;
    --bg-elevated: #21262d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #FF6B35;
    --accent-light: #ff8c5a;
    --accent-soft: rgba(255, 107, 53, 0.12);
    --accent-glow: rgba(255, 107, 53, 0.25);
    --blue: #58a6ff;
    --green: #3fb950;
    --purple: #bc8cff;
    --red: #f85149;
    --yellow: #d29922;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* === Reset & Base === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    line-height: 1.75;
    color: var(--text-primary);
    background-color: #0d1117; /* Fallback for older browsers or load lag */
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(255, 107, 53, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(88, 166, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* === Selection === */
::selection {
    background: var(--accent);
    color: white;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-elevated);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* === Skip Navigation (Accessibility) === */
.skip-nav {
    position: fixed; /* Fixed is more reliable than absolute for top-level hiding */
    top: 0;
    left: 50%;
    transform: translate(-50%, -110%); /* More robust than top: -100% */
    padding: 0.6rem 1.5rem;
    background: var(--accent);
    color: white !important;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 10001;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    white-space: nowrap;
}

.skip-nav:focus {
    transform: translate(-50%, 0);
    outline: 2px solid white;
}

/* === Navigation === */
.site-nav {
    background-color: #0d1117; /* Solid fallback */
    background: rgba(13, 17, 23, 0.9);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

/* Legacy nav selector support */
nav:not([aria-label="breadcrumb"]):not(.site-nav) {
    background: rgba(13, 17, 23, 0.85);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--accent);
    text-decoration: none !important;
    letter-spacing: -0.02em;
    transition: var(--transition);
    flex-shrink: 0;
    z-index: 10;
}

.nav-brand i,
.nav-brand svg {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-brand:hover {
    text-decoration: none !important;
    color: var(--accent-light);
    transform: translateY(-1px);
}

/* Nav Menu */
.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

/* Legacy ul support */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

nav a,
.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

nav a:hover,
.nav-menu a:hover {
    color: var(--accent);
    background: var(--accent-soft);
    text-decoration: none !important;
}

nav a:focus-visible,
.nav-menu a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

nav a.active,
.nav-menu a[aria-current="page"] {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
}

nav a.active::after,
.nav-menu a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* === Mobile Menu Toggle (Hamburger) === */
.nav-toggle {
    display: none !important; /* Force hide on desktop */
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    line-height: 1;
    z-index: 1001;
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
    outline: none;
}

.nav-toggle .hamburger-close {
    display: none;
}

.nav-toggle[aria-expanded="true"] .hamburger-open {
    display: none;
}

.nav-toggle[aria-expanded="true"] .hamburger-close {
    display: inline;
}

/* === Container === */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* === Header === */
header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
}

h1 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

h1 i {
    color: var(--accent);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-style: normal;
    font-weight: 400;
}

/* === Content Card === */
.content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
}

.content p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    text-align: justify;
    color: var(--text-primary);
    line-height: 1.85;
}

.content h2 {
    font-size: 1.6rem;
    color: var(--accent);
    margin: 2.5rem 0 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    padding-left: 1rem;
}

.content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--accent);
    border-radius: 2px;
}

.content h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.content ul,
.content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content li {
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    line-height: 1.7;
}

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

.content img {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

/* === Highlight Box === */
.highlight-box {
    background: var(--bg-elevated);
    border-left: 4px solid var(--accent);
    padding: 1.5rem 1.75rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    transition: var(--transition);
}

.highlight-box:hover {
    border-color: var(--border-hover);
    border-left-color: var(--accent);
    background: var(--bg-card-hover);
}

.highlight-box p {
    margin-bottom: 0.5rem;
    text-align: left;
}

.highlight-box h3 {
    margin-top: 0.5rem;
}

.highlight-box h3 a {
    transition: var(--transition);
    color: var(--text-primary) !important;
}

.highlight-box h3 a:hover {
    color: var(--accent) !important;
    text-decoration: none !important;
}

/* === Info Box === */
.info-box {
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.2);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin: 2rem 0;
}

.info-box h3 {
    color: var(--blue);
    margin-bottom: 1rem;
    margin-top: 0;
}

.info-box p {
    margin-bottom: 0.5rem;
    text-align: left;
}

/* === Links === */
a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-light);
    text-decoration: none;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white !important;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none !important;
    box-shadow: 0 4px 15px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: 0.5s;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
    color: white !important;
    text-decoration: none !important;
}

.btn:hover::before {
    left: 100%;
}

/* === Map === */
.map-embed {
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.map-embed iframe {
    width: 100%;
    height: 400px;
    border: none;
    filter: brightness(0.85) contrast(1.1);
}

/* === Forms === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

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

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

/* === Footer === */
footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    position: relative;
}

footer p {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--text-secondary);
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent);
}

/* === Breadcrumb === */
nav[aria-label="breadcrumb"] {
    background: transparent !important;
    border: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    position: static !important;
    padding: 0 !important;
}

nav[aria-label="breadcrumb"] a {
    color: var(--text-muted) !important;
}

nav[aria-label="breadcrumb"] a:hover {
    color: var(--accent) !important;
}

/* === Article Cards (for artikel.html) === */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.article-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: var(--transition);
}

.article-card:hover::before {
    opacity: 1;
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent-glow); }
}

.content {
    animation: fadeInUp 0.6s ease-out;
}

/* === Back to Top Button === */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* === Reading Progress Bar === */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    z-index: 1001;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* === Table of Contents === */
.toc {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
}

.toc h3 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.toc ul {
    list-style: none;
    padding: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    transition: var(--transition);
}

.toc a:hover {
    color: var(--accent);
    padding-left: 0.5rem;
}

.toc a::before {
    content: '›';
    color: var(--accent);
    font-weight: bold;
}

/* === Tables styling === */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th, td {
    padding: 0.85rem 1.2rem;
    text-align: left;
}

th {
    background: var(--bg-card);
    color: var(--accent);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

td {
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* === Tag / Badge === */
.tag {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    h1 {
        font-size: 1.75rem;
    }

    .content {
        padding: 1.75rem 1.25rem;
    }

    .container {
        padding: 1.25rem;
    }

    .content h2 {
        font-size: 1.35rem;
    }

    /* Mobile Navigation */
    .nav-toggle {
        display: flex !important; /* Show on mobile */
        align-items: center;
        justify-content: center;
    }

    .nav-menu,
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.15rem;
        padding: 0.75rem 0 0.5rem;
        border-top: 1px solid var(--border);
        margin-top: 0.5rem;
    }

    .nav-menu.open,
    nav ul.open {
        display: flex;
        animation: slideDown 0.3s ease;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-menu a,
    nav a {
        display: block;
        text-align: left;
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
        border-radius: var(--radius-sm);
        width: 100%;
    }

    .nav-container {
        padding: 0.6rem 1rem;
        flex-wrap: wrap;
    }

    .highlight-box {
        padding: 1.25rem;
    }

    .map-embed iframe {
        height: 250px;
    }

    footer {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .content {
        padding: 1.25rem 1rem;
        border-radius: var(--radius-md);
    }

    .content h2 {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* === Print === */
@media print {
    body {
        background: white;
        color: #333;
    }

    nav, footer, .back-to-top, .reading-progress {
        display: none;
    }

    .content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}