/* --- Reset & Base --- */
:root {
    --bg-color: #0a0f18;
    --primary-text: #cdd6f4;
    --accent-color1: #00bfff;
    --accent-color2: #ffeb3b;
    --card-bg: rgba(20, 30, 50, 0.3);
    --border-color: rgba(0, 191, 255, 0.2);
    --header-bg: rgba(10, 15, 24, 0.85);

    --font-primary: 'Roboto Mono', monospace;
    --font-headings: 'Orbitron', sans-serif;
    --font-decorative: 'Turret Road', cursive;

    --text-shadow: 0 0 5px rgba(0, 191, 255, 0.5), 0 0 10px rgba(0, 191, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size - akan disesuaikan di media queries */
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--primary-text);
    line-height: 1.6; /* Sedikit menambah spasi antar baris default */
    overflow-x: hidden;
    position: relative;
}

.scanline-overlay, .noise-overlay { /* Existing styles from previous answer */
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 999;
}
.scanline-overlay {
    background: repeating-linear-gradient(transparent,transparent 2px,rgba(0,0,0,0.1) 3px,rgba(0,0,0,0.1) 4px);
    z-index: 1000; opacity: 0.5;
}
.noise-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem; /* Default padding container */
}

/* --- Header & Navigation --- */
#main-header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo h1 {
    font-family: var(--font-headings);
    color: var(--accent-color1);
    font-size: 1.8rem; /* Default desktop */
    text-shadow: var(--text-shadow);
    display: inline;
    white-space: nowrap; /* Mencegah logo wrap */
}
.cursor {
    display: inline-block;
    background-color: var(--accent-color1);
    width: 0.6em;
    height: 1.1em;
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

@keyframes blink { 50% { opacity: 0; } }

#navbar ul { list-style: none; display: flex; }
#navbar li { margin-left: 1.5rem; }
#navbar a {
    color: var(--primary-text);
    text-decoration: none;
    font-family: var(--font-primary);
    font-size: 0.9rem; /* Default desktop */
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    transition: color 0.3s ease, background-color 0.3s ease, text-shadow 0.3s ease;
}
#navbar a:hover, #navbar a.active {
    color: var(--bg-color);
    background-color: var(--accent-color1);
    text-shadow: none;
}

.header-status {
    font-size: 0.75rem; /* Default desktop */
    text-align: center;
    padding: 0.5rem 0;
    color: rgba(205, 214, 244, 0.7);
    border-top: 1px dashed rgba(0, 191, 255, 0.1);
    margin-top: 0.5rem;
}
.status-ok { color: #a6e3a1; }
.status-highlight { color: var(--accent-color2); font-weight: bold; }

#nav-toggle {
    display: none; background: none; border: none; color: var(--accent-color1);
    font-size: 1.8rem; cursor: pointer; flex-direction: column; gap: 5px; padding: 5px; /* Tambah padding agar mudah di-tap */
}
#nav-toggle span { display: block; width: 25px; height: 3px; background-color: var(--accent-color1); transition: all 0.3s ease-in-out; }

/* --- Sections & Content --- */
.content-section {
    padding: 4rem 0; /* Default desktop */
    border-bottom: 1px solid var(--border-color);
}
.content-section:last-of-type { border-bottom: none; }

.section-title {
    font-family: var(--font-headings);
    font-size: 2.2rem; /* Default desktop */
    color: var(--accent-color1);
    margin-bottom: 2.5rem; /* Default desktop */
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: var(--text-shadow);
    max-width: 95%; /* Agar tidak overflow jika terlalu panjang */
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.8rem; /* Default desktop */
    border-radius: 5px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow-wrap: break-word; /* Memastikan teks panjang di dalam card akan wrap */
    word-wrap: break-word; /* Untuk browser lama */
}
.card:hover { transform: translateY(-5px); box-shadow: 0 5px 25px rgba(0, 191, 255, 0.1); }

.field-tag { color: var(--accent-color1); font-weight: bold; }
.bio { margin-top: 1rem; font-size: 1.05rem; /* Default desktop */ }
hr.separator { border: 0; height: 1px; background-image: linear-gradient(to right, rgba(0,191,255,0), rgba(0,191,255,0.5), rgba(0,191,255,0)); margin: 1.5rem 0; }

/* Expertise Section */
.skills-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.skill-category h3 {
    font-family: var(--font-decorative); color: var(--primary-text);
    font-size: 1.3rem; /* Default desktop */
    margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem;
}
.folder-icon { color: var(--accent-color2); margin-right: 0.5em; }
.skill-category ul { list-style: none; }
.skill-category li { margin-bottom: 0.6rem; font-size: 0.95rem; /* Default desktop */ }
.skill-category li span { color: var(--accent-color1); margin-right: 0.5em; font-weight: bold; }

/* Projects Section */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.project-item h4 {
    font-family: var(--font-decorative); color: var(--accent-color1);
    font-size: 1.4rem; /* Default desktop */
    margin-bottom: 0.5rem;
}
.project-item .project-role { font-size: 0.85rem; color: var(--accent-color2); margin-bottom: 0.75rem; font-style: italic; }
.project-item p { font-size: 0.95rem; margin-bottom: 0.75rem; }
.project-item .tags { font-size: 0.8rem; color: rgba(205, 214, 244, 0.7); }
.project-item .tags span { color: var(--accent-color1); font-weight: bold; }
.project-placeholder h4 { color: #f38ba8; }

/* Contact Section */
.contact-info ul { list-style: none; margin-top: 1rem; }
.contact-info li { margin-bottom: 1rem; font-size: 1.05rem; /* Default desktop */ }
.contact-info a {
    color: var(--accent-color1); text-decoration: none;
    border-bottom: 1px dashed var(--accent-color1);
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
    /* overflow-wrap: break-word; word-wrap: break-word;  Sudah dihandle oleh card */
}
.contact-info a:hover { color: var(--accent-color2); border-bottom-color: var(--accent-color2); }
.contact-info .comment { font-size: 0.8rem; color: rgba(205, 214, 244, 0.6); margin-left: 0.5em; font-style: italic; }
.warning-text { font-size: 0.9rem; color: var(--accent-color2); margin-top: 1.5rem; border: 1px dashed var(--accent-color2); padding: 0.5rem; text-align: center; }

/* --- Footer --- */
#main-footer {
    text-align: center; padding: 2.5rem 0; /* Default desktop */
    font-size: 0.85rem; /* Default desktop */
    color: rgba(205, 214, 244, 0.6);
    border-top: 1px solid var(--border-color);
}
#main-footer .glitch-text { font-family: var(--font-decorative); font-size: 1rem; color: var(--accent-color1); margin-top: 0.5rem; position: relative; }

/* --- Utility & Timestamps --- */
.timestamp { font-size: 0.75rem; color: rgba(205, 214, 244, 0.5); text-align: right; margin-top: 1rem; font-style: italic; }


/* --- Responsive Design --- */

/* Tablet (iPad Mini / similar portrait) & Large Phones */
@media (max-width: 992px) {
    html { font-size: 15px; }
    .section-title { font-size: 2rem; }
    .content-section { padding: 3.5rem 0; }
    .card { padding: 1.6rem; }
}

/* Standard Mobile Phones (landscape and portrait) */
@media (max-width: 768px) {
    /* html font-size sudah diatur di 992px atau akan diatur di 480px */
    #logo h1 { font-size: 1.6rem; }
    #navbar ul {
        display: none; flex-direction: column; width: 100%;
        position: absolute; top: calc(100% + 1px); left: 0;
        background-color: var(--header-bg); border-top: 1px solid var(--border-color);
    }
    #navbar ul.active { display: flex; }
    #navbar li { margin: 0; width: 100%; text-align: center; border-bottom: 1px solid var(--border-color); }
    #navbar li:last-child { border-bottom: none; }
    #navbar a { display: block; padding: 1rem; font-size: 1rem; }
    #nav-toggle { display: flex; }

    .header-status { font-size: 0.7rem; } /* Sedikit lebih kecil */
    .skills-layout, .project-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 1.8rem; margin-bottom: 2rem;}
    .content-section { padding: 3rem 0; } /* Kurangi padding section */
    .card { padding: 1.3rem; } /* Kurangi padding card */

    .bio, .contact-info li { font-size: 1rem; } /* Sesuaikan ukuran font konten */
    .skill-category li, .project-item p { font-size: 0.9rem; }
    .skill-category h3 { font-size: 1.15rem; }
    .project-item h4 { font-size: 1.25rem; }
}

/* Smaller Mobile Phones (e.g., iPhone SE, Galaxy S series portrait) */
@media (max-width: 480px) {
    html { font-size: 14px; }
    .container { width: 92%; padding: 0 0.8rem; } /* Lebar container dan paddingnya */
    #logo h1 { font-size: 1.4rem; }
    .cursor { height: 1em; width: 0.55em; }
    #nav-toggle { font-size: 1.6rem; gap: 4px; }
    #nav-toggle span { width: 22px; height: 2.5px; }

    .header-status { display: none; } /* Sembunyikan status jika terlalu sempit */
    .section-title { font-size: 1.6rem; margin-bottom: 1.8rem; }
    .content-section { padding: 2.5rem 0; }
    .card { padding: 1rem; }

    .bio, .contact-info li { font-size: 0.95rem; line-height: 1.5; }
    .skill-category li, .project-item p { font-size: 0.85rem; line-height: 1.45; }
    .skill-category h3 { font-size: 1.1rem; }
    .project-item h4 { font-size: 1.2rem; }
    .project-item .project-role, .project-item .tags { font-size: 0.75rem; }
    .contact-info .comment { font-size: 0.7rem; }
    .warning-text { font-size: 0.8rem; padding: 0.4rem; }

    #main-footer { padding: 1.8rem 0; font-size: 0.8rem; }
    #main-footer .glitch-text { font-size: 0.9rem; }
    .timestamp { font-size: 0.7rem; }
}

/* Very Small Mobile Phones (e.g., 360px width and below) */
@media (max-width: 375px) { /* Menyesuaikan dari 360px ke 375px untuk cakupan lebih luas */
    html { font-size: 13px; } /* Ukuran font dasar paling kecil */
    .container { width: 94%; padding: 0 0.6rem; }
    #logo h1 { font-size: 1.25rem; }
    .cursor { height: 0.9em; width: 0.5em; margin-left: 1px;}
    #nav-toggle { font-size: 1.5rem; }

    #navbar a { font-size: 0.9rem; padding: 0.9rem; } /* Ukuran link di menu mobile */

    .section-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
    .content-section { padding: 2rem 0; }
    .card { padding: 0.8rem; margin-bottom: 1.2rem; }

    .bio, .contact-info li { font-size: 0.9rem; line-height: 1.4; }
    .skill-category li, .project-item p { font-size: 0.8rem; line-height: 1.4; }
    .skill-category h3 { font-size: 1rem; margin-bottom: 0.8rem; }
    .skill-category li { margin-bottom: 0.5rem; }
    .project-item h4 { font-size: 1.1rem; margin-bottom: 0.4rem; }
    .project-item .project-role, .project-item .tags { font-size: 0.7rem; margin-bottom: 0.5rem;}
    .warning-text { padding: 0.3rem; font-size: 0.75rem; }

    #main-footer { padding: 1.5rem 0; font-size: 0.75rem; }
    #main-footer .glitch-text { font-size: 0.85rem; }
    .timestamp { font-size: 0.65rem; margin-top: 0.8rem; }
    hr.separator { margin: 1rem 0; }
}

/* Tambahan untuk layar sangat kecil, jika ada yang masih bermasalah di bawah 320px */
@media (max-width: 320px) {
    html { font-size: 12.5px; } /* Benar-benar kecil */
    .container { width: 95%; padding: 0 0.4rem; }
    #logo h1 { font-size: 1.15rem; }
    .section-title { font-size: 1.3rem; }
    .card { padding: 0.7rem; }
    .bio, .contact-info li { font-size: 0.85rem; }
    .skill-category li, .project-item p { font-size: 0.75rem; }
    .skill-category h3 { font-size: 0.95rem; }
    .project-item h4 { font-size: 1rem; }
    #main-footer { padding: 1.2rem 0; font-size: 0.7rem; }
}