@import url("wave-bg.css");


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --bg: #080d18;
    --card: #111c2e;
    --blue: #38bdf8;
    --white: #f1f5f9;
    --gray: #94a3b8;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    width: 400px;
    height: 400px;
    background: #0ea5e9;
    filter: blur(150px);
    opacity: 0.12;
    top: -100px;
    right: -100px;
    z-index: -1;
}

a {
    text-decoration: none;
    color: inherit;
}

/* NAVBAR */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(8, 13, 24, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid #1e293b;
}

nav {
    max-width: 1100px;
    margin: auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 23px;
    font-weight: bold;
    color: var(--blue);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul a {
    color: var(--gray);
    font-size: 14px;
    transition: .3s;
}

nav ul a:hover {
    color: var(--blue);
}

/* HERO */

section {
    max-width: 1100px;
    margin: auto;
    padding: 100px 20px;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text {
    max-width: 650px;
    animation: fadeUp 1s ease;
}

.tag {
    color: var(--blue);
    font-size: 13px;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(42px, 7vw, 75px);
    line-height: 1.1;
    margin-bottom: 20px;
}

h1 span {
    color: var(--blue);
}

.hero-text p {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 13px 24px;
    background: var(--blue);
    color: #06111e;
    border-radius: 8px;
    font-weight: bold;
    transition: .3s;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 25px #38bdf855;
}

.btn-outline {
    background: transparent;
    color: var(--blue);
    border: 1px solid var(--blue);
    margin-left: 10px;
}

/* PROFIL */

.hero-card {
    width: 300px;
    height: 350px;
    flex-shrink: 0;
    border: 1px solid #334155;
    background: var(--card);
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 50px #0ea5e915;
    animation: float 4s ease-in-out infinite;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-card h3 {
    font-size: 23px;
    margin-bottom: 10px;
}

.hero-card p {
    color: var(--blue);
    font-size: 13px;
}

/* JUDUL SECTION */

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 35px;
    margin-bottom: 12px;
}

.section-title span {
    color: var(--blue);
}

.section-title p {
    color: var(--gray);
}

/* ABOUT */

.about-box {
    background: var(--card);
    border: 1px solid #26354a;
    border-radius: 18px;
    padding: 35px;
    line-height: 1.9;
    color: var(--gray);
}

.about-box strong {
    color: var(--blue);
}

/* SKILLS & HOBBIES */

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: var(--card);
    border: 1px solid #26354a;
    border-radius: 18px;
    padding: 30px;
    transition: .3s;
}

.card:hover {
    transform: translateY(-7px);
    border-color: var(--blue);
    box-shadow: 0 10px 35px #0ea5e910;
}

.icon {
    font-size: 35px;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.card p {
    color: var(--gray);
    line-height: 1.7;
    font-size: 14px;
}

/* CONTACT */

.contact-box {
    text-align: center;
    background: var(--card);
    border: 1px solid #26354a;
    border-radius: 20px;
    padding: 40px 25px;
}

.contact-box p {
    color: var(--gray);
    margin: 20px 0;
}

.contact-info {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
}

.contact-item {
    padding: 15px 20px;
    border: 1px solid #334155;
    border-radius: 10px;
    color: var(--blue);
    font-size: 14px;
    word-break: break-word;
}

/* FOOTER */

footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid #1e293b;
    color: var(--gray);
    font-size: 13px;
}

/* ANIMASI */

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SCROLL REVEAL */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: .8s ease;
}

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

/* RESPONSIVE */

@media (max-width: 768px) {
    nav {
        padding: 18px 15px;
    }

    nav ul {
        gap: 12px;
    }

    nav ul a {
        font-size: 12px;
    }

    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 130px;
    }

    .hero-card {
        width: 260px;
        height: 300px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .about-box {
        padding: 25px;
    }

    .btn {
        padding: 12px 17px;
        font-size: 14px;
    }

    .btn-outline {
        margin-left: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* HAMBURGER MENU */

nav {
    position: relative;
}

.menu-toggle {
    width: 43px;
    height: 43px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 9px;
    cursor: pointer;
    transition: .3s;
}

.menu-toggle:hover {
    border-color: var(--blue);
    box-shadow: 0 0 15px #38bdf830;
}

.menu-toggle span {
    width: 21px;
    height: 2px;
    background: var(--blue);
    border-radius: 5px;
    transition: .3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* DROPDOWN MENU */

.nav-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 20px;
    width: 220px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(15, 27, 45, .97);
    border: 1px solid #334155;
    border-radius: 13px;
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 40px #0008;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: .25s;
    z-index: 200;
}

.nav-menu.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-menu a {
    padding: 13px;
    border-radius: 8px;
    color: var(--gray);
    transition: .25s;
}

.nav-menu a:hover {
    color: var(--blue);
    background: #38bdf815;
    padding-left: 19px;
}

/* FILE & TUGAS */

.task-form {
    max-width: 800px;
    margin: auto;
    padding: 30px;
    background: var(--card);
    border: 1px solid #26354a;
    border-radius: 18px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    color: var(--white);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    background: #080f1c;
    color: var(--white);
    border: 1px solid #334155;
    border-radius: 9px;
    outline: none;
    font: inherit;
    transition: .3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 12px #38bdf820;
}

.form-group input[type="file"] {
    font-size: 13px;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
}

.task-note {
    color: var(--gray);
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.task-form button {
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.task-status {
    margin-top: 15px;
    color: var(--blue);
    font-size: 13px;
}

.task-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.task-card {
    padding: 25px;
    background: var(--card);
    border: 1px solid #26354a;
    border-radius: 15px;
    transition: .3s;
    overflow-wrap: anywhere;
}

.task-card:hover {
    border-color: var(--blue);
    transform: translateY(-5px);
}

.task-card h3 {
    color: var(--blue);
    margin-bottom: 12px;
}

.task-card p {
    color: var(--gray);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.task-meta {
    color: var(--gray);
    font-size: 12px;
    margin-bottom: 15px;
}

.task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.task-actions button {
    padding: 10px 14px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
}

.task-download {
    background: var(--blue);
    color: #06111e;
    border: none;
}

.task-delete {
    background: transparent;
    color: #fca5a5;
    border: 1px solid #7f1d1d;
}

.empty-tasks {
    grid-column: 1 / -1;
    text-align: center;
    padding: 35px;
    color: var(--gray);
    border: 1px dashed #334155;
    border-radius: 15px;
}

/* MOBILE */

@media (max-width: 768px) {

    .nav-menu {
        right: 10px;
        width: 210px;
    }

    .task-form {
        padding: 20px;
    }

    .task-list {
        grid-template-columns: 1fr;
    }

}

/* PILIH FILE */
.file-picker {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}
.selected-file-name {
    color: var(--gray);
    font-size: 13px;
    overflow-wrap: anywhere;
}


/* MINI GAMES */
.game-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.game-button {
    margin-top: 20px;
}

.game-button:hover {
    color: #06111e;
}

/* HALAMAN PILIH MINI GAME (games.html) */
.games-page {
    min-height: calc(100vh - 90px);
    padding-top: 140px;
}
