/* ============================================
   CYBERFOLIO — Design System
   Clean, modern, cybersecurity-oriented
   ============================================ */

/* --- CSS Variables (Dark = default) --- */
:root,
[data-theme="dark"] {
    --bg: #020617;
    --bg-card: #0f172a;
    --bg-card-hover: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e293b;
    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-subtle: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --success: #10b981;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.4);
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --nav-bg: rgba(2, 6, 23, 0.85);
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-subtle: rgba(16, 185, 129, 0.08);
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.08);
    --nav-bg: rgba(248, 250, 252, 0.85);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

/* Smooth theme transitions */
html[data-theme] * {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, fill 0.35s ease;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent horizontal scroll on mobile */
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}
.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 4rem 0;
}

/* --- Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 0 0 transparent;
    transition: box-shadow 0.3s;
    width: 100%;
}
.navbar.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 600;
    font-size: 1.1rem;
}
.brand-icon {
    color: var(--accent);
    font-size: 1.3rem;
}
.brand-icon-svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}
.brand-text {
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-link {
    color: var(--text-muted);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-heading);
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
    color: var(--text);
    background: var(--accent-subtle);
}
.nav-link.active {
    color: var(--accent);
}

/* Mobile menu toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #94a3b8;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s, background 0.2s;
    transform-origin: center;
}
.nav-toggle:hover span { background: #10b981; }
.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Theme Toggle --- */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    font-size: 1.1rem;
    line-height: 1;
    transition: color 0.2s, transform 0.3s;
    position: relative;
    overflow: hidden;
}
.theme-toggle:hover { color: #10b981; }

/* Desktop: show inside nav-links, hide the mobile one */
.theme-toggle-mobile { display: none; }
.theme-toggle-desktop { display: inline-flex; }
.nav-right-mobile { display: none; }

/* Mobile: show outside nav-links, hide inside */
@media (max-width: 1024px) {
    .theme-toggle-mobile { display: inline-flex; }
    .theme-toggle-desktop { display: none; }
    .nav-right-mobile {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        margin-left: auto;
    }
}
.theme-icon-sun,
.theme-icon-moon {
    display: inline-block;
    transition: opacity 0.3s, transform 0.3s;
}
[data-theme="dark"] .theme-icon-sun { opacity: 1; transform: rotate(0deg); }
[data-theme="dark"] .theme-icon-moon { opacity: 0; transform: rotate(-90deg); position: absolute; }
[data-theme="light"] .theme-icon-sun { opacity: 0; transform: rotate(90deg); position: absolute; }
[data-theme="light"] .theme-icon-moon { opacity: 1; transform: rotate(0deg); }

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--text);
    letter-spacing: -0.3px;
    font-family: var(--font-heading);
}
.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}
.page-title-lg {
    font-size: 2.25rem;
}
.page-subtitle {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.text-muted { color: var(--text-muted); }
.accent { color: var(--accent); }

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.card:hover {
    border-color: color-mix(in srgb, var(--border) 50%, var(--accent) 50%);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.1s;
    text-decoration: none;
    line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}
.btn-secondary {
    background: var(--bg-card-hover);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}
.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger-hover);
    border-color: var(--danger-hover);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
.btn-xs { padding: 0.25rem 0.6rem; font-size: 0.76rem; }
.btn-xs { padding: 0.25rem 0.6rem; font-size: 0.78rem; }
.btn-submitting {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    background: var(--accent-subtle);
    color: var(--accent);
    line-height: 1.3;
}
.badge-sm { padding: 0.2rem 0.55rem; font-size: 0.72rem; }
.badge-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-muted { background: var(--bg-card-hover); color: var(--text-muted); }

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 998;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.6rem;
    max-width: 420px;
    width: calc(100vw - 3rem);
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
    font-size: 0.88rem;
    line-height: 1.5;
    pointer-events: auto;
    animation: toastIn 0.35s cubic-bezier(0.21,1.02,0.73,1);
    transition: opacity 0.3s, transform 0.3s;
}
.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}
.toast-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    margin-top: 1px;
}
.toast-body {
    flex: 1;
    min-width: 0;
}
.toast-title {
    font-weight: 600;
    font-size: 0.88rem;
    font-family: var(--font-heading);
    margin-bottom: 0.15rem;
}
.toast-message {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.toast-close:hover { opacity: 1; }
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius) var(--radius);
    animation: toastProgress linear forwards;
}
.toast { position: relative; overflow: hidden; }

/* Toast variants */
.toast-success .toast-icon { background: rgba(16,185,129,0.15); color: var(--accent); }
.toast-success .toast-title { color: var(--accent); }
.toast-success .toast-progress { background: var(--accent); }
.toast-success { border-left: 3px solid var(--accent); }

.toast-error .toast-icon { background: rgba(239,68,68,0.15); color: #ef4444; }
.toast-error .toast-title { color: #ef4444; }
.toast-error .toast-progress { background: #ef4444; }
.toast-error { border-left: 3px solid #ef4444; }

.toast-warning .toast-icon { background: rgba(245,158,11,0.15); color: #f59e0b; }
.toast-warning .toast-title { color: #f59e0b; }
.toast-warning .toast-progress { background: #f59e0b; }
.toast-warning { border-left: 3px solid #f59e0b; }

.toast-info .toast-icon { background: rgba(59,130,246,0.15); color: #3b82f6; }
.toast-info .toast-title { color: #3b82f6; }
.toast-info .toast-progress { background: #3b82f6; }
.toast-info { border-left: 3px solid #3b82f6; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}
@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@media (max-width: 480px) {
    .hide-mobile { display: none !important; }
    .toast-container {
        right: 0.75rem;
        bottom: 0.75rem;
        max-width: calc(100vw - 1.5rem);
    }
    .container { padding: 0 1rem; }
    /* Hero */
    .hero-name { font-size: 1.8rem; }
    .hero-headline { font-size: 1rem; }
    .hero-image img { width: 150px; height: 150px; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-links { justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
    /* Page headers */
    .page-title { font-size: 1.35rem; }
    .page-subtitle { font-size: 0.88rem; }
    /* Cards */
    .card { padding: 1rem; }
    .project-card { padding: 1rem; }
    .blog-card-body { padding: 1rem; }
    .project-number { font-size: 0.68rem; padding: 0.2rem 0.5rem; }
    .project-card-title { font-size: 1rem; }
    .blog-card-title { font-size: 1rem; }
    .blog-card-footer { flex-direction: row; align-items: center; justify-content: space-between; gap: 0.5rem; }
    .project-card-actions { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
    .project-card-actions .btn { flex: 1; min-width: 120px; justify-content: center; }
    /* Skill badges */
    .skill-tags { gap: 0.35rem; }
    .badge { font-size: 0.72rem; padding: 0.22rem 0.6rem; }
    /* Experience */
    .exp-timeline { padding-left: 22px; }
    .exp-dot { left: -22px; width: 14px; height: 14px; }
    .exp-item::before { left: -15px; }
    .exp-position { font-size: 0.95rem; }
    .exp-company { font-size: 0.85rem; }
    .exp-tools { gap: 0.3rem; }
    /* Contact */
    .contact-direct { flex-direction: row; justify-content: center; align-items: center; gap: 0.6rem; flex-wrap: nowrap; }
    .contact-direct-link { gap: 0; width: 2.4rem; height: 2.4rem; justify-content: center; border-radius: 50%; background: var(--bg-subtle, rgba(148,163,184,0.08)); }
    .contact-direct-link i { font-size: 1.1rem; }
    .contact-direct-link .link-label { display: none; }
    .contact-divider { margin: 1rem 0 0.75rem; }
    .contact-card { padding: 1.25rem; }
    /* Buttons */
    .btn { font-size: 0.82rem; padding: 0.5rem 1rem; }
    .btn-sm { font-size: 0.75rem; padding: 0.3rem 0.65rem; }
    /* Footer */
    .footer { padding: 2rem 0 1.5rem; margin-top: 2rem; }
    body.has-cta .footer { margin-top: 0 !important; }
    .footer-heading { font-size: 0.8rem; }
    .footer-bottom { font-size: 0.78rem; flex-direction: column; gap: 0.5rem; text-align: center; }
    /* Filter bars */
    .skill-filter-tags,
    
    .skill-filter-tags .btn,
    .project-filter-tags .btn { font-size: 0.72rem; padding: 0.2rem 0.5rem; }
    /* Error pages */
    .error-code { font-size: 3rem; }
    .error-illustration { width: 120px; height: 120px; }
    /* Navbar */
    .nav-brand-text { font-size: 0.95rem; }
    /* Scroll to top */
    .scroll-top { width: 36px; height: 36px; font-size: 0.85rem; bottom: 1rem; right: 1rem; }
    /* Hero section no min-height */
    .hero-section { padding: 2.5rem 0 2rem; min-height: 0; }
    /* Navbar brand */
    .nav-brand-text { font-size: 0.88rem; }
    .brand-icon-svg { width: 22px; height: 22px; }
    /* Nav container padding */
    .nav-container { padding: 0 1rem; }
    /* Markdown toolbar compact */
    .md-toolbar { gap: 1px; padding: 0.25rem 0.35rem; }
    .md-toolbar-btn { width: 24px; height: 22px; font-size: 0.68rem; }
    .md-btn-codeblock { width: auto; padding: 0 0.4rem; }
    .md-toolbar-sep { margin: 0 0.1rem; height: 14px; }
    /* Date picker full width */
    .custom-datepicker-panel { width: 92vw; }
    .cdp-days { gap: 1px; }
    .cdp-day { font-size: 0.75rem; }
    /* Diagram canvas smaller on phones */
    .diagram-canvas { height: 240px; }
    /* Pagination */
    .pagination-wrapper { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .pagination-link { min-width: 32px; height: 32px; font-size: 0.78rem; }
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-direction: row-reverse;
    justify-content: flex-end;
}
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
}
.form-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}
select.form-input {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}
/* Multi-select / expanded dropdown scrollbar */
select[size].form-input,
select[multiple].form-input {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
select[size].form-input::-webkit-scrollbar,
select[multiple].form-input::-webkit-scrollbar { width: 4px; }
select[size].form-input::-webkit-scrollbar-thumb,
select[multiple].form-input::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
select.form-input option {
    background: var(--bg-card);
    color: var(--text);
    padding: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
}
select.form-input option:checked {
    background: var(--accent);
    color: #fff;
}
select.form-input option:hover {
    background: var(--accent-subtle);
}
/* Dark theme dropdown fix */
[data-theme="dark"] .md-toolbar {
    background: #0f172a;
    border-color: #334155;
}
[data-theme="dark"] .md-toolbar-sep {
    background: #334155;
}
[data-theme="dark"] .md-toolbar + textarea.form-input,
[data-theme="dark"] .md-toolbar + .form-input {
    border-top-color: #334155;
}
[data-theme="dark"] select.form-input option:checked {
    background: var(--accent);
    color: #fff;
}
textarea.form-input { resize: none; min-height: 80px; }

/* --- Markdown Toolbar --- */
.md-toolbar {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    align-items: center;
    gap: 2px;
    padding: 0.4rem 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.md-toolbar + textarea.form-input,
.md-toolbar + .form-input {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.md-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.md-toolbar-btn[title^="Code Block"],
.md-btn-codeblock {
    margin-left: 0;
    width: auto;
    padding: 0 0.5rem;
}
/* Wrapper keeps cb-lang-menu out of the flex flow */
.md-codeblock-wrapper {
    position: relative;
    display: inline-flex;
}
.md-codeblock-wrapper .cb-lang-menu {
    position: absolute;
    top: 100%;
    left: 0;
}
.md-toolbar-btn:hover {
    background: var(--bg);
    color: var(--accent);
}
.md-toolbar-btn i {
    font-size: 0.75rem;
}
.md-toolbar-sep {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 0.25rem;
    opacity: 1;
}
/* --- Date/Time Picker --- */
input[type="datetime-local"].form-input,
input[type="date"].form-input,
input[type="time"].form-input {
    cursor: pointer;
    color-scheme: light;
}
[data-theme="dark"] input[type="datetime-local"].form-input,
[data-theme="dark"] input[type="date"].form-input,
[data-theme="dark"] input[type="time"].form-input {
    color-scheme: dark;
}
input[type="datetime-local"].form-input::-webkit-calendar-picker-indicator,
input[type="date"].form-input::-webkit-calendar-picker-indicator,
input[type="time"].form-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}
input[type="datetime-local"].form-input::-webkit-calendar-picker-indicator:hover,
input[type="date"].form-input::-webkit-calendar-picker-indicator:hover,
input[type="time"].form-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-checkbox { width: auto; }

/* --- Custom Dropdown --- */
.custom-select {
    position: relative;
}
.custom-select-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.custom-select-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.custom-select-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}
.custom-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 50;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}
.custom-select-dropdown::-webkit-scrollbar {
    display: none;
}
.custom-select.open .custom-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.custom-select-option {
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    color: var(--text);
}
.custom-select-option:hover {
    background: var(--accent-subtle);
    color: var(--accent);
}
.custom-select-option.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

/* --- Custom Date Picker --- */
.custom-datepicker {
    position: relative;
}
.custom-datepicker-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.custom-datepicker-placeholder {
    color: var(--text-muted);
}
.custom-datepicker-value {
    flex: 1;
}
.custom-datepicker-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}
.custom-datepicker-panel {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 -8px 24px rgba(0,0,0,0.12);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    padding: 1rem;
}
.custom-datepicker.open .custom-datepicker-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.cdp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.cdp-month-year {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.92rem;
}
.cdp-nav {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: border-color 0.15s, color 0.15s;
    font-size: 0.75rem;
}
.cdp-nav:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.cdp-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.cdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cdp-day {
    background: none;
    border: none;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--text);
    transition: background 0.15s, color 0.15s;
}
.cdp-day:hover:not([disabled]) {
    background: var(--accent-subtle);
    color: var(--accent);
}
.cdp-day-other {
    color: var(--text-muted);
    opacity: 0.4;
    cursor: default;
}
.cdp-today {
    border: 1px solid var(--accent);
    font-weight: 600;
}
.cdp-selected {
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600;
}
.cdp-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.cdp-hour, .cdp-minute {
    width: 48px;
    padding: 0.35rem;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 0.88rem;
    font-family: var(--font-heading);
    font-weight: 600;
}
.cdp-hour:focus, .cdp-minute:focus {
    border-color: var(--accent);
    outline: none;
}
.cdp-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}
.cdp-clear, .cdp-today-btn {
    background: none;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.cdp-clear {
    color: var(--text-muted);
}
.cdp-clear:hover {
    background: var(--bg);
    color: var(--danger);
}
.cdp-today-btn {
    color: var(--accent);
}
.cdp-today-btn:hover {
    background: var(--accent-subtle);
}
@media (max-width: 480px) {
    .custom-datepicker-panel {
        width: calc(100vw - 3rem);
        right: auto;
        left: 0;
    }
}
.form-help {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.form-error {
    display: block;
    font-size: 0.78rem;
    color: var(--danger);
    margin-top: 0.25rem;
}
.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}
/* --- File Upload --- */
.file-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s;
    text-align: center;
}
.file-upload:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}
.file-upload-icon {
    font-size: 2rem;
    color: var(--accent);
    opacity: 0.7;
}
.file-upload:hover .file-upload-icon {
    opacity: 1;
}
.file-upload-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.file-upload-text strong {
    font-size: 0.9rem;
    color: var(--text);
    font-family: var(--font-heading);
}
.file-upload-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.file-upload-name {
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 500;
    font-family: var(--font-mono);
}
.cv-current {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.cv-current-icon {
    font-size: 1.3rem;
    color: var(--accent);
}
.cv-current-link {
    font-weight: 500;
    font-size: 0.88rem;
}
.cv-current-size {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}
.form-notice {
    padding: 0.75rem 1rem;
    background: var(--accent-subtle);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

/* --- Preview Banner --- */
.preview-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--warning);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* --- Image Preview --- */
.image-preview-current,
.image-preview-new {
    margin-bottom: 0.75rem;
}
.image-preview-current img,
.image-preview-new img {
    max-width: 240px;
    max-height: 180px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.image-preview-label {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.3rem;
}

/* --- Hero Section --- */
.hero-section {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}
.hero-text {
    min-width: 0;
}
.hero-greeting {
    color: var(--accent);
    font-weight: 500;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}
.hero-name {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.hero-headline {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.hero-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    max-width: 560px;
}
.hero-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.hero-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.88rem;
    margin-top: 0.5rem;
}
.hero-links a {
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}
.hero-links a:hover { color: #0f172a; }
[data-theme="dark"] .hero-links a { color: #94a3b8; }
[data-theme="dark"] .hero-links a:hover { color: #f8fafc; }
.hero-image {
    display: flex;
    justify-content: center;
}
.hero-image img {
    width: 280px;
    height: 280px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 50%;
    border: 3px solid var(--border);
    flex-shrink: 0;
}
.hero-prefix {
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-mono);
}
.hero-prefix {
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-mono);
}
.hero-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
    vertical-align: middle;
    margin: 0 4px;
}
.hero-typewriter {
    color: var(--text);
    font-family: var(--font-mono);
}
@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    50%       { opacity: 0.8; transform: scale(0.9); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
}

/* --- Skills --- */
.skill-filter {
    margin-bottom: 1.75rem;
}
.skill-filter .project-filter-row {
    margin-bottom: 0;
}

.skill-no-result {
    text-align: center;
    padding: 2rem 0;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}
.skill-card { padding: 1.5rem; }
.skill-category-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.skill-category-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.skill-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --- Projects --- */

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}
.project-card {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}
.project-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
}
.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.project-card:hover .project-card-image img {
    transform: scale(1.04);
}
.project-card-header {
    padding: 1.25rem 1.5rem 0;
}
.project-card-body {
    padding: 0 1.5rem 1.5rem;
}
/* override padding when no image (keep original look) */
.project-card:not(:has(.project-card-image)) {
    padding: 1.5rem;
}
.project-card:not(:has(.project-card-image)) .project-card-header,
.project-card:not(:has(.project-card-image)) .project-card-body {
    padding: 0;
}
.project-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.project-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.5px;
}
.project-category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.project-category-badge:hover {
    background: var(--accent);
    color: #fff;
}
.project-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    flex: 1;
    padding: 0 1.5rem 1.5rem;
}
.project-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}
.project-card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    flex: 1;
}
.project-card-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.25rem;
}
.project-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
}
.project-github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: var(--font-heading);
    transition: color 0.2s;
}
.project-github-link:hover { color: #0f172a; }
[data-theme="dark"] .project-github-link { color: #94a3b8; }
[data-theme="dark"] .project-github-link:hover { color: #f8fafc; }
.project-github-link i {
    font-size: 1rem;
}
.project-card-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    opacity: 0.7;
}

/* --- Project List — full-width card layout --- */
.proj-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.proj-list-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    overflow: hidden;
    padding: 0; /* override .card base padding */
    transition: box-shadow 0.2s, transform 0.2s;
    align-items: stretch;
}
.proj-list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="dark"] .proj-list-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* Image column */
.proj-list-img-wrap {
    display: block;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-card-hover);
    position: relative;
}
.proj-list-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.proj-list-card:hover .proj-list-img {
    transform: scale(1.05);
}
.proj-list-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: var(--accent);
    font-size: 2.5rem;
    opacity: 0.35;
    text-decoration: none;
}

/* Content column */
.proj-list-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.5rem 1.75rem;
    flex: 1;
    min-width: 0;
}
.proj-list-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.proj-list-featured {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: #f59e0b;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 50px;
    padding: 0.2rem 0.6rem;
    letter-spacing: 0.3px;
}
.proj-list-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}
.proj-list-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}
.proj-list-title a:hover { color: var(--accent); }
.proj-list-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.65;
    flex: 1;
    margin: 0;
}
.proj-list-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.proj-list-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}
.proj-list-actions .project-github-link,
.proj-list-actions .proj-list-actions-right {
    margin-left: auto;
}

/* Responsive — stack vertically on mobile */
@media (max-width: 640px) {
    .proj-list-card {
        grid-template-columns: 1fr;
        border-radius: var(--radius);
        overflow: hidden;
        padding: 0; /* override .card base padding */
    }
    .proj-list-img-wrap {
        aspect-ratio: 16 / 8;
        min-height: unset;
        border-radius: 0;
        width: 100%;
    }
    .proj-list-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }
    .proj-list-img-placeholder {
        min-height: 120px;
        border-radius: 0;
    }
    .proj-list-body {
        padding: 1.1rem 1.25rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* --- Detail Pages --- */
.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.detail-breadcrumb a {
    color: var(--text-muted);
    transition: color 0.2s;
}
.detail-breadcrumb a:hover { color: var(--accent); }
.detail-breadcrumb i { font-size: 0.55rem; opacity: 0.5; }
.detail-breadcrumb span { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; display: inline-block; vertical-align: middle; }

/* Blog Detail */
.blog-detail-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.blog-detail-category {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    background: var(--accent-subtle);
    padding: 0.3rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}
.blog-detail-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin-bottom: 1rem;
}
.blog-detail-excerpt {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}
.blog-detail-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.blog-detail-dot {
    opacity: 0.4;
}
.blog-detail-meta i {
    font-size: 0.78rem;
    margin-right: 0.15rem;
}
.blog-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}
.blog-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    color: var(--accent);
    font-weight: 500;
    font-family: var(--font-heading);
}
.blog-detail-back:hover { gap: 0.6rem; }
.blog-detail-content {
    margin-bottom: 2.5rem;
}
.blog-detail-next {
    text-align: right;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.blog-detail-next a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    transition: gap 0.2s;
}
.blog-detail-next a:hover { gap: 0.7rem; }

/* Project Detail Hero */
.proj-hero {
    padding: 2rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.proj-hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin: 0.5rem 0 1rem;
}
.proj-hero-desc {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}
.proj-hero-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.proj-hero-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
/* proj-hero-image removed — cover image now lives between hero and content */
/* Hero section — reduced bottom padding so cover image isn't too far */
/* Hero section keeps normal padding; cover gets its own breathing room */
.proj-cover-container {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}
.proj-cover-wrap {
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    position: relative;
    cursor: pointer;
}
.proj-cover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.proj-cover-wrap:hover .proj-cover-overlay {
    opacity: 1;
}
[data-theme="dark"] .proj-cover-wrap {
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.proj-cover-img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.proj-cover-wrap:hover .proj-cover-img {
    transform: scale(1.03);
}

/* Project Sections */
.proj-section {
    margin-bottom: 5rem;
}
.proj-section:last-child {
    margin-bottom: 0;
}
.proj-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border);
}
.proj-section-title i {
    color: var(--accent);
    font-size: 1rem;
}
.proj-subsection-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}

/* Shared CTA */

/* --- Screenshot Gallery --- */
.ss-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.ss-card {
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.ss-card:hover {
    border-color: color-mix(in srgb, var(--border) 50%, var(--accent) 50%);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.ss-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--bg-card-hover);
}
.ss-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}
.ss-card:hover .ss-card-img img {
    transform: scale(1.05);
}
.ss-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.25s;
    color: #fff;
    font-size: 1.5rem;
}
.ss-card:hover .ss-card-overlay {
    opacity: 1;
}
.ss-card-info {
    padding: 0.85rem 1rem;
}
.ss-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}
.ss-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.2s;
}
.lightbox-close:hover { color: #fff; }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    z-index: 10;
    transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-content {
    max-width: 85vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: lightboxIn 0.25s ease;
}
@keyframes lightboxIn {
    from { transform: scale(0.93); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
.lightbox-caption {
    text-align: center;
    margin-top: 1rem;
    color: #fff;
}
.lightbox-caption h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.lightbox-caption p {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}
.lightbox-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
}
.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.lightbox-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}
.lightbox-dot:hover { background: rgba(255,255,255,0.6); }

@media (max-width: 1024px) {
    .ss-grid { grid-template-columns: 1fr; }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    .lightbox-content { max-width: 95vw; }
}

/* Shared CTA */
.detail-cta-section {
    background: var(--accent);
    padding: 3rem 0;
}
/* CTA + footer: handled via .has-cta class on body */
body.has-cta .footer {
    margin-top: 0 !important;
    border-top: none;
}
.detail-cta-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.detail-cta-text {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}
.detail-cta-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.detail-cta-section .btn-primary {
    background: #fff;
    color: var(--accent);
    border-color: #fff;
}
.detail-cta-section .btn-primary:hover {
    background: rgba(255,255,255,0.9);
}
.detail-cta-section .btn-secondary {
    color: #fff;
    border-color: rgba(255,255,255,0.4);
    background: transparent;
}
.detail-cta-section .btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}

.back-link {
    display: inline-block;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
.back-link:hover { color: var(--accent); }
.detail-cover {
    border-radius: var(--radius);
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid var(--border);
}
.detail-cover img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}
.detail-meta {
    margin-bottom: 2rem;
    font-size: 0.88rem;
}
.detail-summary {
    font-size: 1.1rem;
    color: var(--text);
    line-height: 1.7;
    font-weight: 400;
}
.detail-section {
    margin-bottom: 2.5rem;
}
.detail-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: var(--text);
    letter-spacing: -0.3px;
}
.detail-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.detail-section p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.95rem;
}
.detail-content {
    line-height: 1.9;
    margin: 2rem 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.detail-prose p {
    color: var(--text-muted);
    line-height: 1.85;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}
.detail-prose p:last-child {
    margin-bottom: 0;
}
.detail-prose ul,
.detail-prose ol {
    color: var(--text-muted);
    line-height: 1.85;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}
.detail-prose li {
    margin-bottom: 0.35rem;
}
.detail-prose h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--text);
}
.detail-prose h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.6rem;
    color: var(--text);
}
.detail-prose strong {
    color: var(--text);
    font-weight: 600;
}
.detail-prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.detail-prose blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.5rem 0 0.5rem 1rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-style: italic;
}
.detail-prose code {
    background: var(--bg-card-hover);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--accent);
}
.detail-prose pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}
.detail-prose pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: var(--text);
    font-size: 0.85rem;
}
.detail-prose hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2rem 0;
}
.detail-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin: 1rem 0;
}
.detail-prose table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.detail-prose th,
.detail-prose td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    text-align: left;
}
.detail-prose th {
    background: var(--bg-card-hover);
    font-weight: 600;
    color: var(--text);
}
.detail-prose td {
    color: var(--text-muted);
}
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
}
.detail-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* --- Diagram Viewer (Mermaid) --- */
.diagram-viewer {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}
.diagram-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card-hover);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.diagram-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.82rem;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.diagram-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}
.diagram-zoom-level {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
    font-family: var(--font-mono);
}
.diagram-canvas {
    position: relative;
    height: 380px;
    overflow: hidden;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}
.diagram-inner {
    transform-origin: center center;
    transition: transform 0.15s ease;
    display: inline-block;
}
.diagram-inner svg {
    max-width: none !important;
    height: auto !important;
}
@media (max-width: 1024px) {
    .diagram-canvas { height: 320px; }
}

/* --- Experience Timeline --- */
.exp-timeline {
    position: relative;
    padding-left: 28px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.exp-item {
    position: relative;
}
.exp-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 22px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.exp-dot {
    position: absolute;
    left: -28px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    z-index: 1;
    transition: border-color 0.3s, background 0.3s;
}
.exp-current .exp-dot {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-subtle);
}
.exp-content {
    padding-bottom: 0.5rem;
}
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}
.exp-position {
    font-size: 1.1rem;
    font-weight: 600;
}
.exp-company {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.92rem;
}
.exp-period {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
}
.exp-present {
    color: var(--accent);
    font-weight: 600;
}
.exp-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.exp-location i {
    font-size: 0.75rem;
    color: var(--accent);
    margin-right: 0.15rem;
}
.exp-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
}
.exp-achievements {
    list-style: none;
    padding: 0;
    margin-bottom: 0.5rem;
}
.exp-achievements li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
    line-height: 1.6;
}
.exp-arrow {
    position: absolute;
    left: 0;
    top: 0.3rem;
    color: var(--accent);
    font-size: 0.65rem;
}

/* --- Blog --- */

.filter-group {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.filter-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.filter-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}
.filter-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.filter-chip i {
    font-size: 0.72rem;
    opacity: 0.7;
}
.badge-clickable {
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}
.badge-clickable:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.badge-active {
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--accent);
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
@media (max-width: 900px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
.blog-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.blog-card-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}
.blog-card:hover .blog-card-img { transform: scale(1.04); }
.blog-card-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    align-items: stretch;  /* tambahkan ini */
}
.blog-card-category {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent);
    text-transform: uppercase;
}
.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
}
.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    flex: 1;
}
.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 1rem;
    width: 100%;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.blog-card-meta i {
    font-size: 0.75rem;
}
.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.2s;
}
.blog-card-link:hover {
    gap: 0.6rem;
}
.blog-card-link i {
    font-size: 0.75rem;
    transition: transform 0.2s;
}
.blog-card:hover .blog-card-link i {
    transform: translateX(2px);
}

/* --- Contact --- */
.honeypot-field {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
    opacity: 0;
}
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}
.contact-card {
    padding: 2rem;
}
.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.contact-half { min-width: 0; }
.contact-form .form-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.contact-submit {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
}
.contact-divider {
    position: relative;
    text-align: center;
    margin: 1.75rem 0 1.25rem;
    border-top: 1px solid var(--border);
}
.contact-divider span {
    position: relative;
    top: -0.7rem;
    background: var(--bg-card);
    padding: 0 1rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.contact-direct {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.contact-direct-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.contact-direct-link:hover { color: #0f172a; }
[data-theme="dark"] .contact-direct-link { color: #94a3b8; }
[data-theme="dark"] .contact-direct-link:hover { color: #f8fafc; }
.contact-direct-link i { font-size: 1rem; }
.contact-map-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-map-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.contact-map-title i { color: var(--accent); }
.contact-map {
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: 1;
    min-height: 380px;
    border: 1px solid var(--border);
}
.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 380px;
    transition: filter 0.35s ease;
}
[data-theme="dark"] .contact-map iframe {
    filter: invert(90%) hue-rotate(180deg) brightness(0.85) contrast(0.9);
}
.contact-map-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.contact-map-address i {
    color: var(--accent);
    font-size: 0.8rem;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}
.empty-state-icon {
    display: block;
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
    opacity: 0.5;
}
.empty-state-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.empty-state .text-muted {
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* --- Error Pages --- */
.error-section {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}
.error-container {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}
.error-illustration {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    position: relative;
}
.error-illustration svg {
    width: 100%;
    height: 100%;
}
.error-code {
    display: block;
    font-size: 5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}
.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.error-message {
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.7;
    color: var(--text-muted);
}
.error-actions {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.error-actions-row {
    display: contents;
}
.error-actions-row .btn {
    justify-content: center;
}
.error-btn-full {
    justify-content: center;
}
.error-hint {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.error-hint-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.error-hint-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.error-hint-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.error-hint-list i {
    color: var(--accent);
    font-size: 0.7rem;
}

/* Error page — terminal block */
.error-terminal {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 1.1rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-align: left;
    max-width: 100%;
    overflow-x: auto;
}
.error-prompt {
    color: var(--accent);
    font-weight: 600;
}
.error-cmd {
    color: var(--text);
}
.error-cursor {
    color: var(--accent);
    animation: err-blink 1s step-end infinite;
}
.error-terminal-out {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.1rem;
}
@keyframes err-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
/* Maintenance banner */
.error-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: 1.25rem;
}
.error-badge-warn {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.3);
}
.error-badge-danger {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
}
.error-badge-info {
    background: var(--accent-subtle);
    color: var(--accent);
    border: 1px solid var(--accent);
}
/* Pulse animation for maintenance dot */
.error-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: errorPulse 1.5s ease-in-out infinite;
}
@keyframes errorPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--border);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}
.footer-col {
    min-width: 0;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-weight: 600;
    font-size: 1.05rem;
    font-family: var(--font-heading);
    margin-bottom: 0.75rem;
}
.footer-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
    max-width: 340px;
}
.footer-heading {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.85rem;
    color: var(--text);
}
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-nav a {
    color: #64748b;
    font-size: 0.88rem;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.footer-nav a:hover { color: #0f172a; }
[data-theme="dark"] .footer-nav a { color: #94a3b8; }
[data-theme="dark"] .footer-nav a:hover { color: #f8fafc; }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}
.footer-copy {
    color: var(--text-muted);
    font-size: 0.78rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 0 1rem;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
        display: flex;
    }
    .nav-links.open {
        max-height: 500px;
        opacity: 1;
        padding: 0.75rem 1rem;
        gap: 0.25rem;
    }
    .nav-link {
        width: 100%;
        padding: 0.6rem 0.75rem;
        opacity: 0;
        transform: translateY(-6px);
        transition: opacity 0.2s, transform 0.2s, color 0.2s, background 0.2s;
    }
    .nav-links.open .nav-link {
        opacity: 1;
        transform: translateY(0);
    }
    .nav-links.open .nav-link:nth-child(1) { transition-delay: 0.03s; }
    .nav-links.open .nav-link:nth-child(2) { transition-delay: 0.06s; }
    .nav-links.open .nav-link:nth-child(3) { transition-delay: 0.09s; }
    .nav-links.open .nav-link:nth-child(4) { transition-delay: 0.12s; }
    .nav-links.open .nav-link:nth-child(5) { transition-delay: 0.15s; }
    .nav-links.open .nav-link:nth-child(6) { transition-delay: 0.18s; }
    .nav-links.open .theme-toggle { transition-delay: 0.21s; }
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-name { font-size: 2.2rem; }
    .hero-intro { max-width: 100%; }
    .hero-actions { justify-content: center; }
    .hero-links { justify-content: center; }
    .hero-image { order: -1; }
    .hero-image img { width: 200px; height: 200px; aspect-ratio: 1 / 1; margin: 0 auto; }
    .page-title { font-size: 1.65rem; }
    .page-title-lg { font-size: 1.85rem; }
    .section-title { font-size: 1.2rem; }
    .detail-section h2 { font-size: 1.2rem; }
    body { line-height: 1.8; }
    .section { padding: 2.5rem 0; }
    .detail-section p,
    .detail-content { line-height: 2; font-size: 0.92rem; }
    .hero-headline { line-height: 1.7; }
    .timeline-desc,
    .blog-card-excerpt,
    .project-card-desc { line-height: 1.8; }
    .skills-grid { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .contact-row { grid-template-columns: 1fr; gap: 0; }
    .contact-card { padding: 1.5rem; }
    .contact-map { min-height: 280px; }
    .contact-map iframe { min-height: 280px; }
    .exp-header { flex-direction: column; }
    .detail-actions { flex-wrap: wrap; }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .footer-grid .footer-col:first-child {
        grid-column: 1;
    }
    .footer-desc { max-width: 100%; }
    /* Blog/Project detail responsive */
    .blog-detail-title { font-size: 1.6rem; }
    .proj-hero-title { font-size: 1.6rem; }
    .proj-hero-desc { font-size: 0.95rem; }
    .blog-detail-excerpt { font-size: 0.95rem; }
    .blog-detail-meta { flex-wrap: wrap; }
    .blog-detail-tags { gap: 0.3rem; }
    .proj-hero-actions { flex-direction: column; }
    .proj-hero-actions .btn { width: 100%; justify-content: center; }
    .proj-section-title { font-size: 1.1rem; }
    /* Detail CTA */
    .detail-cta-section { padding: 2rem 0; }
    .detail-cta-title { font-size: 1.25rem; }
    .detail-cta-actions { flex-direction: column; align-items: center; }
    .detail-cta-actions .btn { width: 100%; max-width: 280px; justify-content: center; }
    /* Screenshot gallery */
    .ss-grid { grid-template-columns: 1fr; }
    /* Lightbox */
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
    .lightbox-content { max-width: 95vw; }
    .lightbox-nav { width: 36px; height: 36px; font-size: 0.85rem; }
    /* Hide lightbox nav on mobile — use swipe instead */
    .lightbox-prev,
    .lightbox-next { display: none; }
    /* Error pages */
    .error-illustration { width: 140px; height: 140px; }
    .error-code { font-size: 3.5rem; }
    .error-title { font-size: 1.25rem; }
    .error-actions { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; gap: 0.6rem; }
    .error-actions .btn { width: 100%; justify-content: center; }
    /* Modal */
    .modal-box { padding: 1.5rem; max-width: 90vw; }
    /* Experience */
    .exp-period { font-size: 0.78rem; }
    .exp-position { font-size: 1rem; }
    /* Project card */
    .project-card-header { gap: 0.5rem; }
    .project-category-badge { font-size: 0.65rem; padding: 0.2rem 0.6rem; }
    /* Breadcrumb */
    .detail-breadcrumb { font-size: 0.75rem; flex-wrap: wrap; }
    /* Filter */
    .skill-filter .form-input,
    .project-filter .form-input,
    
    /* Contact */
    .contact-direct { gap: 1rem; }
    /* Hero min-height adjustment on tablet */
    .hero-section { min-height: auto; padding: 3rem 0; }
    /* Navbar */
    .nav-brand-text { font-size: 0.9rem; }
    /* Detail CTA — margin-top removed at small screens */
    .detail-cta-section { margin-top: 1rem; }
    /* Skill filter tags wrap */
    .skill-filter-tags,
    
    .skill-filter-tags .btn,
    .project-filter-tags .btn { font-size: 0.78rem; padding: 0.25rem 0.6rem; }
    /* Hero actions stack */
    .hero-actions { flex-wrap: wrap; }
    /* Blog detail back */
    .blog-detail-back { font-size: 0.82rem; }
    /* Experience */
    .exp-period { white-space: normal; }
    /* Skill icon form */
    .skill-icon-wrap { flex-direction: row; align-items: flex-start; }
    /* Custom datepicker on mobile */
    .custom-datepicker-panel { width: 90vw; left: 50%; transform: translateX(-50%) translateY(4px); }
    .custom-datepicker.open .custom-datepicker-panel { transform: translateX(-50%) translateY(0); }
    /* Custom select full width */
    .custom-select-dropdown { max-height: 200px; }
    /* Markdown toolbar wrap */
    .md-toolbar { gap: 1px; padding: 0.3rem; }
    .md-toolbar-btn { width: 26px; height: 24px; font-size: 0.72rem; }
    .md-btn-codeblock { width: auto; padding: 0 0.45rem; }
    /* Lightbox on mobile */
    .lightbox-img { max-height: 55vh; }
    .lightbox-modal { padding: 1rem; }
    /* Section padding tighter on tablet */
    .section { padding: 2.5rem 0; }
}

/* --- Pagination --- */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.pagination-info {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.pagination {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    text-decoration: none;
}
.pagination-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pagination-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.pagination-active:hover {
    color: #fff;
}
.pagination-dots {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 0 0.25rem;
}

/* --- Scroll to Top --- */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, border-color 0.2s, color 0.2s;
}
.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    transform: scale(0.9) translateY(10px);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-lg);
}
.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}
.modal-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}
.modal-icon.modal-warn {
    color: var(--warning);
}
.modal-icon.modal-danger {
    color: var(--danger);
}
.modal-icon.modal-info {
    color: var(--accent);
}
.modal-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.modal-message {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}
.modal-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}

/* --- Global Scrollbar Theming --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
::-webkit-scrollbar-corner { background: transparent; }

/* Dark mode: scrollbar via color-scheme */
html[data-theme="dark"] { color-scheme: dark; scrollbar-color: var(--border) transparent; }
html[data-theme="light"] { color-scheme: light; scrollbar-color: var(--border) transparent; }

/* --- Public Mobile Sidebar --- */
.pub-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 301;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    visibility: hidden;
    box-shadow: -4px 0 24px rgba(0,0,0,0.2);
}
/* Topbar inside sidebar — gear + close, aligned to navbar height */
.pub-sidebar-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    height: 64px;
    padding: 0 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.pub-sidebar.open {
    transform: translateX(0);
    visibility: visible;
}
.pub-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 300;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.pub-sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
/* Navbar z-index — below overlay so brand blurs when sidebar opens */
.navbar { z-index: 299; }
.pub-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 0.75rem;
    border-bottom: 1px solid var(--border);
    height: 64px;
}
.pub-sidebar-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
}
.pub-sidebar-close:hover { color: var(--text); }
.pub-sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0;
}
.pub-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-heading);
    border-left: 3px solid transparent;
    transition: color 0.2s, background 0.2s;
    text-decoration: none;
}
.pub-sidebar-link:hover {
    color: var(--text);
    background: var(--accent-subtle);
}
.pub-sidebar-link.active {
    color: var(--accent);
    border-left-color: var(--accent);
    background: var(--accent-subtle);
}
.pub-sidebar-icon {
    width: 1.1rem;
    text-align: center;
    font-size: 0.88rem;
    color: var(--accent);
}
body.pub-sidebar-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .pub-sidebar-overlay.open { display: block; }
}

/* --- Project Detail Header --- */
.proj-detail-header {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════════
   Rich Project Sections
   ══════════════════════════════════════════════════════════════════ */

/* Goals & Objectives — numbered card grid */
.proj-objectives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.proj-obj-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.25rem 1.25rem 1rem;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-left: 3px solid var(--accent);
}
.proj-obj-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(16,185,129,0.08);
}
.proj-obj-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}
.proj-obj-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.4rem;
    line-height: 1.35;
}
.proj-obj-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Tech Stack — 3-column card grid */
.proj-techstack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.proj-tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    transition: border-color 0.2s;
}
.proj-tech-card:hover {
    border-color: var(--accent);
}
.proj-tech-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.proj-tech-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}
.proj-tech-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-subtle);
    border: 1px solid var(--accent);
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
}
.proj-tech-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* Key Features & Deliverables — list with icon */
.proj-deliverables-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.proj-deliverable-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}
.proj-deliverable-item:hover {
    border-color: var(--accent);
}
.proj-deliverable-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-size: 0.9rem;
}
.proj-deliverable-body {
    flex: 1;
    min-width: 0;
}
.proj-deliverable-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 0.25rem;
    font-family: var(--font-mono);
    word-break: break-word;
}
.proj-deliverable-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* Key Metrics — horizontal stat cards */
.proj-metrics-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.proj-metric-card {
    flex: 1;
    min-width: 120px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.proj-metric-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(16,185,129,0.08);
}
.proj-metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    font-family: var(--font-heading);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}
.proj-metric-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Section icon badges — warna pastel per icon */
/* All section title icons — consistent accent green */
.proj-section-title .fa-bullseye,
.proj-section-title .fa-microchip,
.proj-section-title .fa-box-open,
.proj-section-title .fa-chart-bar { color: var(--accent); }

/* Responsive */
@media (max-width: 640px) {
    .proj-objectives-grid { grid-template-columns: 1fr; }
    .proj-techstack-grid  { grid-template-columns: 1fr; }
    .proj-metrics-row     { gap: 0.75rem; }
    .proj-metric-value    { font-size: 1.5rem; }
}

/* Page title icons — accent green */
.page-title i,
.proj-hero-title i,
h1.page-title i {
    color: var(--accent) !important;
    font-size: 0.85em;
    margin-right: 0.25em;
    display: inline;
}
/* proj-section-title icons default green (override per-section colors kept) */
.proj-section-title i {
    color: var(--accent);
}

/* Filter row — search + dropdown side by side */
.project-filter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.project-filter-row .form-input {
    flex: 1;
    min-width: 180px;
    margin-bottom: 0;
}
@media (max-width: 1024px) {
    .project-filter-row { flex-direction: column; align-items: stretch; }
    .project-filter-row .form-input {
        width: 100%;
        max-width: 100% !important;
        flex: unset;
    }
}

/* Hide navbar right controls when sidebar is open (moved inside sidebar) */
body.pub-sidebar-open .nav-right-mobile {
    opacity: 0;
    pointer-events: none;
}

/* Blog post navigation — prev/next */
.blog-post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.blog-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s, gap 0.2s;
}
.blog-nav-btn:hover { color: var(--accent-dark); gap: 0.75rem; }
.blog-nav-prev { margin-right: auto; }
.blog-nav-next { margin-left: auto; }

/* ── Related Projects Section ─────────────────────────────────── */
.related-projects-section {
    padding-top: 0;
    padding-bottom: 5rem;
}
.related-projects-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    color: var(--text);
}
.related-projects-title i { color: var(--accent); }
.related-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.related-project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}
.related-project-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: color-mix(in srgb, var(--border) 50%, var(--accent) 50%);
}
.related-project-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
}
.related-project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}
.related-project-card:hover .related-project-img { transform: scale(1.04); }
.related-project-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 2rem;
    opacity: 0.4;
}
.related-project-body {
    padding: 1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.related-project-cat {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}
.related-project-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.35;
}
.related-project-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}
/* Responsive */
@media (max-width: 1024px) {
    .related-projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .related-projects-grid { grid-template-columns: 1fr; }
}

/* ── Reading Progress Bar ──────────────────────────────────────── */
.reading-progress-bar {
    position: fixed;
    top: 64px; /* tepat di bawah navbar */
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #34d399);
    z-index: 999;
    transition: width 0.1s linear, opacity 0.3s ease;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* ── Blog Detail Cover Image ───────────────────────────────────── */
.blog-detail-cover {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.blog-detail-cover-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 480px;
    object-fit: cover;
}
[data-theme="dark"] .blog-detail-cover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

/* ── Cover Image Caption & Lightbox ───────────────────────────── */
.cover-figure {
    cursor: pointer;
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}
.cover-figure:hover .cover-caption {
    opacity: 1;
    transform: translateY(0);
}
.cover-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.6rem 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    border-radius: 0 0 var(--radius) var(--radius);
}
.cover-caption i { color: rgba(255,255,255,0.8); font-size: 0.78rem; }

/* Lightbox */


/* ── Print Styles ──────────────────────────────────────────────── */
@media print {
    /* Hide non-essential elements */
    .navbar,
    .pub-sidebar,
    .pub-sidebar-overlay,
    .footer,
    .detail-cta-section,
    .related-projects-section,
    .blog-post-nav,
    .reading-progress-bar,
    .scroll-top,
    .lightbox-overlay,
    .theme-toggle,
    .nav-toggle,
    .toast-container,
    .preview-banner,
    button,
    .btn { display: none !important; }

    /* Page setup */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12pt;
        line-height: 1.6;
    }
    .main-content { padding-top: 0 !important; }

    /* Force colors for print */
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    /* Links — show URL after link text */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: #666;
    }
    /* Exception: internal nav links, icon links */
    .nav-link:after,
    .footer-link:after,
    [href^="#"]:after { content: ""; }

    /* Typography */
    h1 { font-size: 22pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 13pt; }

    /* Page breaks */
    .proj-section { page-break-inside: avoid; }
    h2, h3 { page-break-after: avoid; }

    /* Cover image — full width print */
    .proj-cover-img,
    .blog-detail-cover-img {
        max-width: 100%;
        max-height: 300px;
        object-fit: contain;
    }

    /* Skill cards — single column */
    .skill-grid { grid-template-columns: 1fr 1fr !important; }

    /* About page print */
    .hero-section { padding: 1rem 0 !important; }
    .hero-image { max-width: 120px !important; }

    /* Container full width */
    .container, .container-narrow {
        max-width: 100% !important;
        padding: 0 !important;
    }
}