/*
Theme Name: SMK Mekanik
Theme URI: http://abdulghufron.my.id
Author: M. Abdul Ghufron
Description: Tema khusus SMK Teknik Pemesinan dan Mekanik. Kompatibel penuh dengan standar WordPress, widget, navigasi menu, dan Gutenberg block editor.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smk-mekanik
*/

/* --- Design System & CSS Variables --- */
:root {
    --bg-main: #0f172a;          /* Charcoal Dark */
    --bg-card: #1e293b;          /* Slate Dark Card */
    --bg-footer: #05070c;        /* Deep Black Footer */
    --bg-header: rgba(15, 23, 42, 0.95); /* Header transparent */
    --border-color: #334155;     /* Slate Muted */
    
    --primary: #3b82f6;           /* Steel Blue */
    --primary-hover: #2563eb;
    --accent: #f59e0b;            /* Warning Yellow/Gold */
    --accent-hover: #d97706;
    
    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;

    --font-stack: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-accent: rgba(59, 130, 246, 0.15);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-stack);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.site-logo span {
    color: var(--accent);
}

.logo-gear {
    animation: spin 8s linear infinite;
    color: var(--accent);
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-navigation a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
}

/* --- Hero Section (Industrial theme) --- */
.hero-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-main) 0%, rgba(59, 130, 246, 0.08) 100%);
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 50px;
    align-items: center;
}

.hero-badge {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.hero-title {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--accent);
    color: #0f172a;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    color: #0f172a;
    transform: translateY(-2px);
}

.hero-image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

/* --- Layout Grid (Standard WordPress compatible) --- */
.content-area {
    padding: 60px 0;
}

.site-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

@media (max-width: 900px) {
    .site-main-grid,
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Sidebar & Widgets --- */
.sidebar-area {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    align-self: start;
}

.widget {
    margin-bottom: 40px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 700;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
    border-bottom: none;
}

/* --- Articles & Loop --- */
.article-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.article-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.article-header {
    margin-bottom: 15px;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 15px;
}

.article-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.article-title a {
    color: var(--text-primary);
}

.article-excerpt {
    color: var(--text-light);
    margin-bottom: 20px;
}

.featured-image-wrapper {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* --- Comments Template --- */
.comments-area {
    margin-top: 50px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
}

.comment-list {
    list-style: none;
    margin-bottom: 30px;
}

.comment {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
}

.comment:last-child {
    border-bottom: none;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 700;
}

.comment-metadata {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-content {
    color: var(--text-light);
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    margin-bottom: 15px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--bg-footer);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px 0;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.footer-brand p {
    color: var(--text-muted);
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--text-muted);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Mobile Navigation Optimizations --- */
.mobile-nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}
.mobile-nav-toggle:hover {
    color: var(--accent);
}

.mobile-navigation-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background-color: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(12px);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.mobile-navigation-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-title {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent);
}

.drawer-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-close:hover {
    color: var(--accent);
}

.mobile-drawer-nav {
    display: flex;
    flex-direction: column;
}

.mobile-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-list li {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-navigation-drawer.open .mobile-menu-list li {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered entry transitions */
.mobile-navigation-drawer.open .mobile-menu-list li:nth-child(1) { transition-delay: 0.1s; }
.mobile-navigation-drawer.open .mobile-menu-list li:nth-child(2) { transition-delay: 0.15s; }
.mobile-navigation-drawer.open .mobile-menu-list li:nth-child(3) { transition-delay: 0.2s; }
.mobile-navigation-drawer.open .mobile-menu-list li:nth-child(4) { transition-delay: 0.25s; }
.mobile-navigation-drawer.open .mobile-menu-list li:nth-child(5) { transition-delay: 0.3s; }
.mobile-navigation-drawer.open .mobile-menu-list li:nth-child(6) { transition-delay: 0.35s; }

.mobile-menu-list li a {
    color: var(--text-light);
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-list li a:hover {
    color: var(--accent);
}

/* Submenu layout support for standard WP custom menus */
.mobile-menu-list .sub-menu {
    list-style: none;
    padding-left: 20px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu-list .sub-menu a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: none;
}

/* Light mode overrides for Drawer */
.light-mode .mobile-navigation-drawer {
    background-color: rgba(255, 255, 255, 0.98);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

.light-mode .mobile-menu-list li a {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.light-mode .mobile-menu-list li a:hover {
    color: var(--accent);
}

.light-mode .drawer-title {
    color: var(--primary);
}

.light-mode .drawer-close {
    color: var(--text-primary);
}

.light-mode .drawer-close:hover {
    color: var(--accent);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Responsive Header Toggle */
@media (max-width: 992px) {
    .desktop-navigation {
        display: none !important;
    }
    .mobile-nav-toggle {
        display: flex !important;
    }
}

/* --- Beautiful Animations (Entry & Hovers) --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content, .hero-image-wrapper, .article-card, .sidebar-area {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-image-wrapper {
    animation-delay: 0.15s;
}

/* Button & Card Micro-animations */
.btn, .article-card, .widget, .site-logo {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn:hover {
    box-shadow: 0 4px 15px var(--shadow-accent);
}

.btn-accent:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}



/* --- Smooth Transition for Themes --- */
body, header, main, article, footer, aside, section, div, p, a, h1, h2, h3, h4, h5, h6, input, textarea, button {
    transition: background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Light Mode Variables --- */
.light-mode {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-footer: #f1f5f9;
    --bg-header: rgba(248, 250, 252, 0.95);
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --text-light: #334155;
    --shadow-accent: rgba(59, 130, 246, 0.06);
}

/* --- Blueprint Grid for Hero Section --- */
.hero-section {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.light-mode .hero-section {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-color: var(--bg-main);
}

/* Card Glow Hover & Custom Card Styling */
.article-card {
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px var(--shadow-accent);
}

/* --- Category Tabs Filters --- */
.category-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--shadow-accent);
}

/* --- Interactive Theme Customizer Panel --- */
.customizer-widget {
    position: fixed;
    bottom: 30px;
    right: 90px;
    z-index: 999;
}

.customizer-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.customizer-toggle:hover {
    transform: rotate(30deg) scale(1.08);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 4px 20px var(--shadow-accent);
}

.customizer-panel {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 300px;
    background-color: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

.customizer-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.light-mode .customizer-panel {
    background-color: rgba(255, 255, 255, 0.95);
}

.customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.customizer-header h4 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.customizer-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.customizer-close:hover {
    color: var(--accent);
}

.customizer-content {
    padding: 20px;
}

.customizer-section {
    margin-bottom: 20px;
}

.customizer-section h5 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Mode Options (Light/Dark) */
.mode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mode-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

/* Preset Palettes */
.palette-grid {
    display: flex;
    gap: 10px;
}

.palette-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.palette-btn:hover {
    transform: scale(1.15);
}

.palette-btn.active {
    border-color: var(--text-primary);
    transform: scale(1.15);
}

/* Custom Pickers */
.custom-pickers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.picker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

.picker-item input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 36px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    background: none;
}

.picker-item input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.picker-item input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* --- Scroll-to-Top with Progress --- */
.scroll-top-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-top-wrapper.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-wrapper:hover {
    transform: scale(1.08);
    border-color: var(--primary);
    box-shadow: 0 4px 20px var(--shadow-accent);
}

.scroll-top-wrapper:hover .scroll-top-arrow {
    color: var(--primary);
    transform: translateY(-2px);
}

.scroll-top-arrow {
    position: absolute;
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.progress-circle {
    transform: rotate(-90deg);
}

.progress-background {
    stroke: rgba(255, 255, 255, 0.05);
}

.light-mode .progress-background {
    stroke: rgba(0, 0, 0, 0.05);
}

.progress-bar {
    stroke: var(--primary);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
}

/* --- Scroll reveal classes --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.light-mode .hero-stats {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Posts Grid Layout --- */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.posts-grid .article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
}

.posts-grid .article-card .featured-image-wrapper {
    margin-bottom: 0;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    aspect-ratio: 16/10;
}

.posts-grid .article-card .featured-image-wrapper a,
.posts-grid .article-card .featured-image-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.posts-grid .article-card .card-content-wrap {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.posts-grid .article-card .article-excerpt p {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 0;
}

/* --- Competency Feature Cards --- */
.competency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

.competency-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.competency-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px var(--shadow-accent);
}

.comp-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.competency-card:hover .comp-icon {
    background-color: var(--primary);
    color: #ffffff;
}

.competency-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.competency-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Responsive grid layout adjustments */
@media (max-width: 600px) {
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
}



/* --- Visual Highlights & Custom Profile Image --- */
.highlight-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.hero-image-wrapper {
    width: 360px;
    height: 360px;
    border-radius: 50% !important;
    border: 6px solid var(--bg-card) !important;
    box-shadow: 0 15px 35px var(--shadow-accent);
    margin: 0 auto;
}

.hero-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- About Section (Tentang Saya) --- */
.about-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrap {
    position: relative;
    border-radius: 16px;
    overflow: visible;
}

.about-img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: block;
}

.badge-experience {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: var(--primary);
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-accent);
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.exp-years {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.exp-text {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-tagline {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
}

.about-desc {
    font-size: 1.05rem;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.profile-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 30px;
    margin-bottom: 30px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 25px 0;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-val {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 700;
}

.about-achievements h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.about-achievements ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-achievements li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }

/* --- Skills Section --- */
.skills-section {
    padding: 80px 0;
    background-color: rgba(30, 41, 59, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.light-mode .skills-section {
    background-color: rgba(241, 245, 249, 0.5);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 50px auto;
}

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

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.skill-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 25px var(--shadow-accent);
}

.skill-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    background-color: var(--primary);
    color: #ffffff;
}

.skill-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.skill-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    grid-auto-rows: 200px;
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.gallery-item.size-v {
    grid-row: span 2;
}

.gallery-item.size-h {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay-text {
    opacity: 1;
}

.gallery-overlay-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.gallery-overlay-text span {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- Achievements Section (Timeline) --- */
.achievements-section {
    padding: 80px 0;
    background-color: rgba(30, 41, 59, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.light-mode .achievements-section {
    background-color: rgba(241, 245, 249, 0.3);
}

.timeline-wrap {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-wrap::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: transparent;
    width: 50%;
}

.timeline-item.left { left: 0; }
.timeline-item.right { left: 50%; }

.timeline-badge {
    width: 40px;
    height: 40px;
    position: absolute;
    top: 25px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    z-index: 10;
    left: 50%;
    margin-left: -20px;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-badge {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 0 15px var(--shadow-accent);
}

.timeline-panel {
    padding: 24px;
    background-color: var(--bg-card);
    position: relative;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.timeline-item:hover .timeline-panel {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.timeline-panel h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.timeline-panel p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* --- Testimonial Slider --- */
.testimonial-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.testimonial-slider-container {
    max-width: 750px;
    margin: 0 auto;
    position: relative;
}

.testimonial-slider {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.testimonial-card {
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease-in-out;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 35px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.testimonial-card.active {
    opacity: 1;
    visibility: visible;
}

.testimonial-quote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 25px;
    position: relative;
}

.testimonial-quote::before {
    content: '“';
    font-size: 4rem;
    position: absolute;
    left: -20px;
    top: -25px;
    opacity: 0.08;
    font-family: serif;
    color: var(--primary);
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.user-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.slider-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 0 10px;
}

.slider-arrow {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.slider-arrow:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot.active {
    background-color: var(--primary);
    width: 20px;
    border-radius: 10px;
}

/* --- Featured Posts Section --- */
.featured-posts-section {
    padding: 80px 0;
    background-color: rgba(30, 41, 59, 0.15);
    border-bottom: 1px solid var(--border-color);
}

.light-mode .featured-posts-section {
    background-color: rgba(241, 245, 249, 0.4);
}

/* --- Collaboration Section (Form) --- */
.collab-section {
    padding: 80px 0;
}

.collab-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.collab-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 35px;
}

.collab-buttons {
    display: flex;
    gap: 15px;
}

.collab-form-wrap {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.collab-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row input,
.form-row textarea {
    width: 100%;
    padding: 14px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--shadow-accent);
}

.form-feedback.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-feedback.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Layout Grid Adjustments --- */
.blog-section {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.placeholder-img-card {
    border-radius: 0;
}

/* --- Optimized Mobile Responsive Rules --- */
@media (max-width: 900px) {
    .about-grid,
    .collab-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }
    
    .about-image-wrap {
        max-width: 480px;
        margin: 0 auto 30px auto;
    }
    
    .timeline-wrap::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 20px;
    }
    
    .timeline-item.right {
        left: 0%;
    }
    
    .timeline-badge {
        left: 11px;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    /* Hero section responsive updates */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content {
        order: 2; /* Content below image on mobile */
    }

    .hero-image-wrapper {
        order: 1; /* Image on top */
        width: 260px;
        height: 260px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        text-align: center;
    }

    .stat-num {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* About elements */
    .profile-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .badge-experience {
        padding: 10px 18px;
        bottom: -15px;
        right: -15px;
    }

    .exp-years {
        font-size: 1.6rem;
    }

    /* Gallery Masonry */
    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
    }
    
    .gallery-item.size-h {
        grid-column: span 1;
    }
    
    /* Testimonial height safety */
    .testimonial-slider {
        height: 290px;
    }
    
    .testimonial-card {
        padding: 25px;
    }
    
    .testimonial-quote {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Forms */
    .collab-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .collab-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .collab-form-wrap {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    /* Hero title scaling */
    .hero-title {
        font-size: 1.85rem;
    }

    .hero-desc {
        font-size: 0.95rem;
    }

    /* 3-column stats shrink safeguard */
    .hero-stats {
        gap: 8px;
    }

    .stat-num {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    /* Masonry to stack for portrait mobile */
    .gallery-masonry {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    
    .gallery-item.size-v {
        grid-row: span 1;
    }

    /* Testimonial slider expand safeguard */
    .testimonial-slider {
        height: 340px;
    }
}

/* --- Premium Footer & Social Media Links --- */
.footer-social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.light-mode .footer-social-links a {
    background-color: rgba(15, 23, 42, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(15, 23, 42, 0.05);
}

.footer-social-links a:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-accent);
    border-color: var(--primary);
}

/* Centered footer on mobile layout overrides */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-col ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-left: 0;
    }
    
    .footer-social-links {
        justify-content: center;
    }
}

/* --- Responsive Theme Customizer for Mobile (Bottom Sheet UX) --- */
@media (max-width: 576px) {
    .customizer-widget {
        bottom: 20px;
        right: 80px;
        z-index: 9999;
    }
    
    .scroll-top-wrapper {
        bottom: 20px;
        right: 20px;
        z-index: 9998;
    }

    .customizer-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100%;
        height: auto;
        max-height: 80vh;
        border-radius: 24px 24px 0 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
        z-index: 10000;
    }
    
    .customizer-panel.open {
        transform: translateY(0);
    }
    
    .customizer-header {
        padding: 20px 24px 15px 24px;
        position: relative;
    }
    
    /* Drag handle indicator at the top of the sheet */
    .customizer-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 2px;
        background-color: var(--border-color);
        opacity: 0.6;
    }
    
    .customizer-content {
        padding: 20px 24px 30px 24px;
        overflow-y: auto;
        max-height: calc(80vh - 65px);
    }
    
    .palette-grid {
        justify-content: space-between;
        gap: 12px;
    }
    
    .palette-btn {
        width: 38px;
        height: 38px;
    }
    
    .custom-pickers {
        gap: 15px;
    }
    
    .picker-item {
        font-size: 0.95rem;
    }
    
    .picker-item input[type="color"] {
        width: 48px;
        height: 32px;
    }
}
