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

[data-theme="light"] {
    --bg: #f5f5f0;
    --bg-card: #eaeae4;
    --border: #c8c8c0;
    --text: #1a1a18;
    --text-muted: #5a5a55;
    --accent: #2d5a8e;
    --accent-hover: #1e3f63;
    --tag-bg: #dde4ed;
    --tag-text: #2d5a8e;
    --btn-outline-border: #1a1a18;
    --btn-outline-hover-bg: #1a1a18;
    --btn-outline-hover-text: #f5f5f0;
    --star-color: #b8860b;
}

[data-theme="dark"] {
    --bg: #111110;
    --bg-card: #1c1c1b;
    --border: #2e2e2c;
    --text: #e8e8e2;
    --text-muted: #888884;
    --accent: #6a9fd8;
    --accent-hover: #8ab5e2;
    --tag-bg: #1e2a38;
    --tag-text: #6a9fd8;
    --btn-outline-border: #e8e8e2;
    --btn-outline-hover-bg: #e8e8e2;
    --btn-outline-hover-text: #111110;
    --star-color: #f0c040;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text);
    background-color: var(--bg);
    transition: background-color 0.25s ease, color 0.25s ease;
}

h1, h2, h3 {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: normal;
    line-height: 1.25;
    color: var(--text);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; font-weight: bold; }

p { color: var(--text); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
strong { font-weight: bold; }

.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

/* HEADER */
header {
    position: sticky; top: 0; z-index: 100;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    transition: background-color 0.25s ease;
}
.header-inner {
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.logo { display: flex; align-items: baseline; gap: 0.4rem; flex-wrap: wrap; }
.logo-name { font-size: 1.05rem; font-weight: bold; color: var(--text); }
.logo-title { font-size: 0.85rem; color: var(--text-muted); }

nav { display: flex; align-items: center; gap: 1.5rem; }
.nav-links { list-style: none; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.nav-links a {
    font-size: 0.875rem; color: var(--text-muted);
    text-decoration: none; letter-spacing: 0.02em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

#theme-toggle {
    background: none; border: 1px solid var(--border); color: var(--text);
    cursor: pointer; font-size: 1rem; width: 2rem; height: 2rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px; transition: border-color 0.2s, background-color 0.2s;
    flex-shrink: 0;
}


/* Nav controls wrapper */
.nav-controls { display: flex; align-items: center; gap: 0.5rem; }

/* Hamburger button */
#hamburger {
    display: none;
    flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    background: none; border: 1px solid var(--border); cursor: pointer;
    width: 2rem; height: 2rem; border-radius: 4px; padding: 5px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}
#hamburger:hover { background-color: var(--bg-card); }
.ham-line {
    display: block; width: 16px; height: 2px;
    background-color: var(--text); border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
#hamburger.open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburger.open .ham-line:nth-child(2) { opacity: 0; }
#hamburger.open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
    display: none;
    overflow: hidden;
    max-height: 0;
    width: 100%; 
    transition: max-height 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
    background-color: var(--bg);
    border-top: 1px solid transparent;
}
.mobile-menu.open {
    max-height: 320px;
    padding: 0.75rem 0 1rem;
    border-top-color: var(--border);
}
.mobile-nav-links {
    list-style: none;
    display: flex; flex-direction: column;
}
.mobile-nav-links li a {
    display: block;
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}
.mobile-nav-links li a:hover {
    color: var(--text);
    background-color: var(--bg-card);
}

#theme-toggle:hover { background-color: var(--bg-card); }

/* HERO */
.hero { padding: 5rem 0 4rem; }
.hero-label { font-size: 0.9rem; color: var(--text-muted); letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.hero-name { margin-bottom: 1.25rem; }
.hero-desc { max-width: 600px; font-size: 1.05rem; color: var(--text-muted); margin-bottom: 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
    display: inline-block; padding: 0.6rem 1.4rem;
    font-family: Georgia, serif; font-size: 0.9rem;
    text-decoration: none; border-radius: 3px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s; cursor: pointer;
}
.btn-primary { background-color: var(--accent); color: #fff; border: 1px solid var(--accent); }
.btn-primary:hover { background-color: var(--accent-hover); border-color: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-secondary { background-color: transparent; color: var(--text); border: 1px solid var(--btn-outline-border); }
.btn-secondary:hover { background-color: var(--btn-outline-hover-bg); color: var(--btn-outline-hover-text); text-decoration: none; }

.divider { border: none; border-top: 1px solid var(--border); margin: 0; }

/* SECTIONS */
.section { padding: 4rem 0;}
.section-grid {
    display: grid; grid-template-columns: 180px 1fr;
    gap: 2rem 3rem; align-items: start;
}
.section-label { padding-top: 0.2rem; }
.section-label span {
    display: block; font-size: 0.75rem; color: var(--text-muted);
    letter-spacing: 0.1em; margin-bottom: 0.3rem;
}
.section-label h2 { font-size: 1.1rem; font-weight: bold; color: var(--text); }
.section-content { display: flex; flex-direction: column; gap: 1.25rem; }

/* ABOUT FACTS */
.about-facts { display: flex; gap: 2.5rem; padding-top: 0.5rem; flex-wrap: wrap; }
.fact { display: flex; flex-direction: column; }
.fact-number { font-size: 1.75rem; font-weight: bold; color: var(--text); line-height: 1; }
.fact-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* SKILLS */
.skills-group { border-left: 2px solid var(--border); padding-left: 1rem; }
.skills-group h3 {
    font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 0.5rem; font-weight: bold;
}
.skill-list { list-style: none; display: flex; flex-direction: column; gap: 0.3rem; }
.skill-list li { font-size: 0.95rem; color: var(--text); }
.skill-list li::before { content: "– "; color: var(--text-muted); }

/* GITHUB REPOS */
.github-profile-link { font-size: 0.8rem; color: var(--text-muted); }
.github-profile-link a { color: var(--accent); }

#repo-grid { display: flex; flex-direction: column; gap: 1rem; }

.project-card {
    border: 1px solid var(--border); border-radius: 4px;
    padding: 1.5rem; background-color: var(--bg-card);
    transition: border-color 0.2s;
}
.project-card:hover { border-color: var(--accent); }

.project-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem;
}
.project-header h3 { font-size: 1.05rem; }

.project-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.tag {
    font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 3px;
    background-color: var(--tag-bg); color: var(--tag-text); letter-spacing: 0.03em;
}

.repo-stats { display: flex; gap: 1rem; margin-top: 0.75rem; flex-wrap: wrap; }
.repo-stat { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 0.3rem; }
.repo-stat .star { color: var(--star-color); }

.project-desc { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 0; }
.project-links { display: flex; gap: 1.25rem; margin-top: 1rem; }
.link-text { font-size: 0.875rem; color: var(--accent); text-decoration: none; transition: color 0.2s; }
.link-text:hover { color: var(--accent-hover); text-decoration: underline; }

.repo-loading, .repo-error {
    font-size: 0.93rem; color: var(--text-muted);
    padding: 1.5rem; border: 1px solid var(--border);
    border-radius: 4px; text-align: center;
}
.repo-error { color: #b94a3a; border-color: #b94a3a33; }

#repo-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
margin-top: 2rem;
}

.project-card {
border: 1px solid var(--border);
padding: 1.5rem;
border-radius: 8px;
background: var(--card-bg);
transition: transform 0.2s;
}

.project-card:hover {
transform: translateY(-5px);
}

/* TIMELINE */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
    display: grid; grid-template-columns: 160px 1fr;
    gap: 1rem 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: 1px solid var(--border); }
.timeline-meta { display: flex; flex-direction: column; gap: 0.2rem; padding-top: 0.15rem; }
.timeline-period { font-size: 0.8rem; color: var(--text-muted); }
.timeline-company { font-size: 0.8rem; color: var(--accent); font-style: italic; }
.timeline-body h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.timeline-body p { font-size: 0.93rem; color: var(--text-muted); margin-bottom: 0; }

/* CONTACT */
#contact {
    min-height: calc(100vh - 150px); 
    display: flex; 
    align-items: center; 
    padding-top: 0; 
    padding-bottom: 0;}
.contact-list { display: flex; flex-direction: column; }
.contact-item {
    display: flex; align-items: baseline; gap: 1.5rem;
    padding: 0.75rem 0; border-bottom: 1px solid var(--border);
}
.contact-item:first-child { border-top: 1px solid var(--border); }

.contact-label { 
    display: flex;         
    align-items: center;     
    gap: 0.5rem;           
    font-size: 0.85rem; 
    color: var(--text-muted); 
    letter-spacing: 0.05em; 
    min-width: 110px;      
}

/* Memperbesar ukuran logonya sedikit */
.contact-label i {
    font-size: 1.1rem;
    color: var(--text);
}


.contact-value { font-size: 0.95rem; color: var(--accent); }
.contact-value:hover { color: var(--accent-hover); text-decoration: underline; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 1.5rem 0; }
.footer-inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0.5rem;
}
footer span { font-size: 0.8rem; color: var(--text-muted); }
.back-top { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.back-top:hover { color: var(--text); text-decoration: none; }


/* --- UPDATE: JADWAL SHALAT BERTUMPUK --- */
.prayer-list {
    list-style: none;
    display: flex;
    flex-direction: column; /* Ini yang membuat elemen bertumpuk ke bawah */
    gap: 0.75rem;
    padding: 0;
}

.prayer-item {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Teks di kiri, jam di kanan */
    background-color: var(--bg);
    border: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    transition: transform 0.2s, border-color 0.2s;
}

.prayer-item:hover {
    transform: translateX(5px); /* Efek meluncur sedikit ke kanan saat kursor diarahkan */
    border-color: var(--accent);
}

.prayer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.prayer-icon {
    color: var(--accent);
    font-size: 1.1rem;
    width: 25px; /* Menjaga agar jarak teks tetap rata meski lebar ikon berbeda */
    text-align: center;
}

.prayer-name {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.prayer-time {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text);
}

/* PENGATURAN LAYOUT CONTACT & WIDGET */
.contact-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4rem; /* Jarak antara Widget dan tulisan Contact */
}

/* DESAIN KOTAK WIDGET (JAM KIRI, JADWAL KANAN) */
.time-prayer-widget {
    display: flex;
    flex-direction: row; 
    align-items: center; 
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2.5rem;
    width: 100%;
}

.current-time-box {
    flex: 0 0 auto; 
    border-right: 1px solid var(--border);
    padding-right: 3rem;
    margin-right: 3rem;
}

.prayer-times-box {
    flex: 1; 
}

/* DESAIN JAM ANALOG */
.analog-clock {
    position: relative;
    width: 120px;
    height: 120px;
    border: 4px solid var(--border);
    border-radius: 50%;
    background-color: var(--bg);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.05); /* Sedikit bayangan di dalam */
}

/* Pengaturan dasar semua jarum jam */
.hand {
    position: absolute;
    bottom: 50%; /* Titik putarnya ada di tengah jam */
    transform-origin: bottom center; /* Memastikan jarum berputar dari pangkalnya, bukan tengahnya */
    border-radius: 4px;
    /* transition: transform 0.1s cubic-bezier(0.4, 2.08, 0.55, 0.44); Opsional: Efek detak memantul */
}

/* Ukuran masing-masing jarum */
.hour-hand { 
    width: 6px; 
    height: 35px; 
    left: 53px; /* (120/2) - (6/2) - 4px border */
    background-color: var(--text); 
    z-index: 1;
}

.minute-hand { 
    width: 4px; 
    height: 45px; 
    left: 54px; 
    background-color: var(--text-muted); 
    z-index: 2;
}

.second-hand { 
    width: 2px; 
    height: 50px; 
    left: 55px; 
    background-color: var(--accent); /* Menggunakan warna biru/tema Anda */
    z-index: 3;
}

/* Titik tengah jam */
.clock-center {
    position: absolute;
    top: 50%; 
    left: 50%;
    width: 12px; 
    height: 12px;
    background-color: var(--accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
}

/* ANGKA JAM ANALOG */
.clock-number {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px; /* Menarik ke titik tengah persis */
    margin-left: -10px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-muted);
    z-index: 0; /* Pastikan posisinya di bawah jarum jam */
}

/* Styling Jam Digital */
.digital-clock {
    display: none; /* Sembunyikan di desktop */
    font-size: 3rem;
    font-weight: bold;
    font-family: 'Courier New', Courier, monospace; /* Gaya digital */
    color: var(--text);
    letter-spacing: 2px;
}

/* RESPONSIVE: Mobile Mode (max-width: 650px) */
@media (max-width: 650px) {
    .time-prayer-widget {
        flex-direction: column; /* Widget jadi vertikal di mobile */
        padding: 1.5rem;
    }

    .current-time-box {
        border-right: none;
        border-bottom: 1px solid var(--border); /* Garis pindah ke bawah */
        padding-right: 0;
        margin-right: 0;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
        width: 100%;
    }

    /* SEMBUNYIKAN ANALOG, TAMPILKAN DIGITAL */
    .analog-clock {
        display: none;
    }

    .digital-clock {
        display: block;
    }
}

/* RESPONSIVE */
@media (max-width: 650px) {
    .section { scroll-margin-top: 120px; }
    .section-grid { grid-template-columns: 1fr; gap: 1rem; }
    .section-label { display: flex; align-items: center; gap: 0.75rem; }
    .section-label span { margin-bottom: 0; }
    .timeline-item { grid-template-columns: 1fr; gap: 0.4rem; }
    
    /* Navigasi Desktop Sembunyi */
    .nav-links { display: none; } 
    
    /* Munculkan Tombol Hamburger */
    #hamburger { display: flex; } 
    
    /* Munculkan Mobile Drawer Container */
    .mobile-menu { display: block; }

    .hero { padding: 3rem 0 2.5rem; }
    .about-facts { gap: 1.5rem; }
    .project-header { flex-direction: column; }
    
    /* Agar header tidak terlalu lebar di HP */
    .logo-title { display: none; } 
}
