@import url('https://fonts.googleapis.com/css2?family=Anton&family=Poppins:wght@300;400;500;600;700;900&display=swap');

/* CSS Variables for easy theme management */
:root {
    --primary-bg: #000000;
    --primary-text: #ffffff;
    --secondary-text: #cccccc;
    --accent-blue: #1a237e; /* Navy indigo metalic */
    --border-light: rgba(255, 255, 255, 0.3);
    --glow-color: rgba(255, 255, 255, 0.5);
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles - Dark Mode, Centering Content */
body {
    background-color: var(--primary-bg);
    color: var(--primary-text);
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden; /* Hide potential overflow from background animation */
    position: relative; /* For absolute positioning of background and search link */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Custom selection style */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari */
    -khtml-user-select: none;    /* Konqueror HTML */
    -moz-user-select: none;      /* Old versions of Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
}

/* Custom selection background and text color */
::selection {
    background-color: var(--primary-text);
    color: var(--primary-bg);
}

/* Abstract Background Effect */
.background-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* Subtle smoke/fluid-like gradients */
        radial-gradient(circle at 20% 30%, rgba(100, 100, 100, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(150, 150, 150, 0.06) 0%, transparent 50%),
        linear-gradient(90deg, rgba(50, 50, 50, 0.04) 0%, transparent 50%, rgba(50, 50, 50, 0.04) 100%);
    background-size: 200% 200%, 200% 200%, 400% 100%; /* Different sizes for different layers */
    background-position: 0% 0%, 100% 100%, 0% 0%;
    animation:
        moveGradient1 25s linear infinite alternate,
        moveGradient2 35s linear infinite alternate,
        flowGradient 40s linear infinite;
    filter: blur(15px); /* Apply a subtle blur to the background itself */
    z-index: -1;
    opacity: 0.8; /* Slightly reduce opacity for subtlety */
}

/* Keyframe Animations for Background */
@keyframes moveGradient1 {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

@keyframes moveGradient2 {
    0% { background-position: 100% 0%; }
    100% { background-position: 0% 100%; }
}

@keyframes flowGradient {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 0%; }
}

/* Main Content Container */
.main-content {
    text-align: center;
    max-width: 900px; /* Limit width for better readability */
    padding: 20px;
    z-index: 1; /* Ensure content is above background */
}

/* "Hi, I'm" Text */
.greeting {
    font-weight: 300;
    font-size: 1.4rem;
    margin-bottom: 0px; /* Mengurangi jarak */
    letter-spacing: 0.1em;
    color: var(--secondary-text);
}

/* Main Name "CAKRA" */
.name {
    font-family: 'Anton', sans-serif;
    font-size: 6rem; /* Very large */
    font-weight: 400;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 20px;
    letter-spacing: 0.03rem;
}

/* "Creative Designer" Badge */
.badge {
    display: inline-block;
    padding: 12px 28px; /* Diperbesar */
    border: 2px solid #5ecef7;
    border-radius: 50px;
    font-size: 1.1rem; /* Diperbesar */
    font-weight: 400;
    color: var(--secondary-text);
    margin-bottom: 30px;
    background-color: rgba(255, 255, 255, 0.05); /* Slight background for visibility */
}

/* Description Text */
.description {
    font-size: 1.1rem;
    font-weight: 400; /* Mengatur ke regular secara eksplisit, atau gunakan 500 untuk lebih tebal */
    color: var(--secondary-text);
    line-height: 1.6;
    max-width: 850px; /* Diperlebar agar teks deskripsi 404 menjadi 1 baris di desktop */
    margin: 0 auto 40px auto;
}

/* Call to Action Section */
.cta-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 50px;
}

.cta-text {
    font-size: 1rem;
    color: var(--secondary-text);
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.portfolio-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(26, 35, 126, 0.2); /* Navy dengan transparansi 20% */
    border: 2px solid var(--accent-blue); /* Stroke warna navy solid */
    color: var(--primary-text);
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.portfolio-button:hover {
    background-color: #3f51b5; /* Lighter shade of navy on hover */
    transform: translateY(-2px);
}

.programming-button {
    background-color: rgba(0, 250, 146, 0.2); /* Hijau dengan transparansi 20% */
    border-color: #00fa92; /* Stroke warna hijau solid */
    color: white; /* Teks dan ikon berubah menjadi putih */
}

.programming-button:hover {
    background-color: rgba(0, 250, 146, 0.4);
}

/* Social Media Container (Glassmorphism) */
.social-media-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.social-media-container a {
    color: white; /* Warna putih */
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-media-container a:hover {
    color: #ffff00; /* Kuning saat hover */
    transform: translateY(-3px);
}

/* Search/Link Element (Bottom Left) */
.search-link {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 1;
}

/* Default Fade-in Animation for all reveal elements */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Override for Search Link (Keep its specific Slide-in effect) */
.search-link.reveal {
    opacity: 0;
    transform: translateX(-50px); /* Slide from left instead of bottom */
    transition: opacity 1.2s ease-in, transform 1.2s ease-in;
}

.search-link.reveal.visible {
    opacity: 1;
    transform: translateX(0);
}

.search-link a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 50px;
    text-decoration: none;
    color: var(--primary-text);
    font-size: 0.9rem;
    font-weight: 500; /* Membuat teks sedikit lebih tebal */
    background-color: rgba(255, 255, 255, 0.2); /* Background putih dengan transparansi 20% */
    box-shadow: 0 0 15px var(--glow-color); /* Glow effect */
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.search-link a:hover {
    box-shadow: 0 0 25px var(--primary-text);
    border-color: var(--primary-text);
}

/* Responsive Design */
@media (max-width: 768px) {
    .name {
        font-size: 5rem;
    }

    .description {
        font-size: 1rem;
        max-width: 90%;
    }

    .greeting {
        font-size: 1.3rem;
    }

    .badge, .cta-text, .portfolio-button, .search-link a {
        font-size: 0.9rem;
    }

    .social-media-container {
        gap: 15px;
        /* padding: 12px 25px; - Removed as container is now just icons */
    }

    .search-link {
        display: none;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 4rem;
    }

    .greeting {
        font-size: 1.2rem;
    }

    .description {
        font-size: 0.9rem;
    }

    .portfolio-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .social-media-container {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px 20px;
        gap: 10px;
    }

    .social-media-container a { /* Specific size for mobile */
        font-size: 1.6rem;
    }
}