/* --- NEW Lime Material Expressive Palette (Light & Dark Support) --- */
:root {
    /* --- LIGHT MODE VARIABLES (DEFAULT) --- */
    --primary-accent: #BFD63E;   /* Lime Cerah */
    --primary-dark: #829618;     /* Lime Gelap (untuk Text Header di Light Mode) */
    --secondary-accent: #F0F4C3; /* Lime Sangat Muda (untuk Tonal Button) */
    
    --surface-bg: #F9FBE7;       /* Background Halaman (Creamy Lime) */
    --container-bg: #ffffff;     /* Background Kartu (Putih) */
    
    --text-primary: #3E4232;     /* Text Utama (Dark Olive) */
    --text-secondary: #737865;   /* Text Sekunder (Greyish Olive) */
    
    --outline-color: #DCE775;    /* Warna Garis Pinggir */
    
    /* Variable khusus Header Transparan */
    --header-bg-glass: rgba(249, 251, 231, 0.85);

    /* Shape Definitions */
    --radius-large: 28px;
    --radius-medium: 16px;
}

/* --- DARK MODE CONFIGURATION --- */
@media (prefers-color-scheme: dark) {
    :root {
        /* Warna Aksen tetap cerah agar kontras */
        --primary-accent: #D7EE58; 
        
        /* Warna Header berubah jadi Terang (karena background gelap) */
        --primary-dark: #E4E8CC;   
        
        /* Warna Tonal Button jadi gelap */
        --secondary-accent: #2A2E1E; 

        /* Background Gelap (Dark Grey dengan nuansa Olive) */
        --surface-bg: #12140D;       
        --container-bg: #1C1F16;     
        
        /* Text jadi Terang */
        --text-primary: #E6E8D8;     
        --text-secondary: #C3C7B5;   
        
        /* Outline jadi lebih gelap */
        --outline-color: #444933;    

        /* Header Gelap Transparan */
        --header-bg-glass: rgba(18, 20, 13, 0.85);
    }

    /* Penyesuaian khusus bayangan di Dark Mode agar lebih terlihat */
    .project-card, .credit-item, .about-content img {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: var(--surface-bg);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease; /* Transisi halus saat ganti mode */
}

/* --- General Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

/* --- Expressive Typography --- */
h1, h2, h3 {
    font-family: 'Lexend', sans-serif;
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: 4.5rem; color: var(--primary-dark); letter-spacing: -2px; }
h2 { font-size: 3rem; text-align: center; margin-bottom: 4rem; color: var(--primary-dark); }
h3 { font-size: 1.75rem; color: var(--text-primary); margin-bottom: 0.5rem; }
p { color: var(--text-secondary); margin-bottom: 1rem; }
a { color: var(--primary-dark); text-decoration: none; font-weight: 500;}

/* --- Header & Navigation --- */
.main-header {
    /* MENGGUNAKAN VARIABLE BARU AGAR BISA DARK MODE */
    background-color: var(--header-bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--outline-color); /* Menggunakan outline color agar dinamis */
    transition: background-color 0.3s ease;
}

.main-header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.main-header .logo a {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Lexend', sans-serif;
    color: var(--primary-dark);
}

.main-header nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-header nav ul li { margin-left: 2.5rem; }

.main-header nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}
.main-header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}
.main-header nav a:hover { color: var(--primary-dark); }
.main-header nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* --- Wavy Section Divider --- */
.wavy-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    line-height: 0;
    transform: rotate(180deg);
}
.wavy-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}
.wavy-divider .shape-fill {
    fill: var(--surface-bg);
    transition: fill 0.3s ease;
}

/* --- Hero Section --- */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    background-color: var(--container-bg);
    transition: background-color 0.3s ease;
}

#hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin: 1.5rem auto 2.5rem;
    max-width: 600px;
}

/* --- Expressive Buttons --- */
.m3-button {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Lexend', sans-serif;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    text-align: center;
    border: none;
    cursor: pointer;
    position: relative;
    border-radius: 50px 50px 50px 15px;
}

.m3-button.filled {
    background-color: var(--primary-accent);
    /* Teks tombol tetap gelap karena aksen Lime tetap cerah di dark mode */
    color: #2E3500; 
    box-shadow: 0 4px 15px rgba(191, 214, 62, 0.4);
}
.m3-button.filled:hover {
    transform: translateY(-5px);
    background-color: #CBE048;
    box-shadow: 0 8px 25px rgba(191, 214, 62, 0.5);
}

.m3-button.tonal {
    background-color: var(--surface-bg);
    color: var(--primary-dark);
    border: 2px solid var(--outline-color);
}
.m3-button.tonal:hover {
    background-color: var(--primary-accent);
    color: #2E3500;
    border-color: var(--primary-accent);
    transform: scale(1.05);
}

.hero-social-links {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

/* --- About Section --- */
#about {
   background-color: var(--surface-bg);
   min-height: 100vh;
   display: flex;
   align-items: center;
   transition: background-color 0.3s ease;
}
#about .about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-content img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 24px;
    margin: 0 auto;
    display: block;
    box-shadow: 0 12px 24px rgba(130, 150, 24, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-content img:hover {
    transform: scale(1.03);
    box-shadow: 0 16px 32px rgba(191, 214, 62, 0.4);
}


/* --- Projects Section --- */
#projects {
    background-color: var(--container-bg);
    transition: background-color 0.3s ease;
}
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background-color: var(--container-bg);
    border: 1px solid var(--outline-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
    border-radius: 12px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(191, 214, 62, 0.15);
    border-color: var(--primary-accent);
}

.project-card img {
    object-fit: cover;
    height: 200px;
    border-bottom: 1px solid var(--outline-color);
    transition: transform 0.4s ease;
}
.project-card:hover img {
    transform: scale(1.1);
}

.project-card .project-info {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.project-card.eol {
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
}
.project-card.eol:hover {
    filter: grayscale(0%);
    opacity: 1;
}
.project-card.eol .project-info h3 {
    text-decoration: line-through;
    color: var(--text-secondary); /* Menggunakan variabel agar terlihat di dark mode */
}

/* --- Credits Section --- */
#credits {
    background: var(--surface-bg);
    transition: background-color 0.3s ease;
}
.credits-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr 1fr;
}

.credit-item {
    background: var(--container-bg);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--outline-color);
    transition: all 0.3s ease;
    border-radius: 40px 10px 40px 10px;
}
.credit-item:hover {
     transform: scale(1.05);
     border-color: var(--primary-accent);
     box-shadow: 0 8px 25px rgba(191, 214, 62, 0.2);
}

/* --- Footer --- */
.main-footer {
    background-color: var(--primary-accent);
    color: #2E3500;
    text-align: center;
    padding: 4rem 0;
    position: relative;
    transition: background-color 0.3s ease;
}
.main-footer .wavy-divider .shape-fill {
    fill: var(--primary-accent);
    transition: fill 0.3s ease;
}

.footer-social-links a {
    color: #2E3500;
    margin: 0 0.75rem;
    display: inline-block;
    transition: transform 0.3s ease;
}
.footer-social-links a:hover {
    transform: translateY(-5px) scale(1.2);
    color: #000;
}

.footer-social-links svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.main-footer p {
    margin-top: 1.5rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.8;
    color: #2E3500;
    font-weight: 500;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    h1 { font-size: 3rem; letter-spacing: -1px; }
    h2 { font-size: 2.5rem; }

    .main-header .nav-container {
        flex-direction: column;
        padding: 0.75rem 1rem;
    }
    .main-header nav ul { margin-top: 0.5rem; }
    .main-header nav ul li { margin: 0 0.75rem; }

    #about .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .credits-container {
        grid-template-columns: 1fr;
    }
     .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-content img {
        width: 200px;
        height: 200px;
        margin-bottom: 2rem;
    }
}
/* Styling untuk Splash Screen */
#prophecy-splash {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: black;
    z-index: 9999; /* Pastikan paling atas */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, visibility 1s;
    overflow: hidden;
}

#prophecy-splash.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Base style dari generator sebelumnya */
#overlayWrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#textContainer {
    font-family: 'ProphecyType', serif; /* Pastikan font terpasang */
    font-size: 32px;
    text-align: center;
    color: transparent;
    background: linear-gradient(to bottom, #4488ff, #2266cc);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 20px;
    width: 80vw;
    max-width: 450px;
}

#output {
    position: relative;
    width: 512px;
    height: 256px;
    transform: scale(0.8); /* Sesuaikan ukuran jika terlalu besar di mobile */
}

#output canvas {
    position: absolute;
    top: 0; left: 0;
    image-rendering: pixelated;
}

#background { opacity: 0.5; z-index: 0; }
#ghostIcon2 { opacity: 0.2; z-index: 1; }
#ghostIcon { opacity: 0.4; z-index: 2; }
#panel { z-index: 3; }