/* ========================================
   DOSEN PORTFOLIO - CUSTOM STYLES
======================================== */

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

:root {
    --primary: #fefefe;
    --primary-dark: #ffffff;
    --secondary: #fdfdfd;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --dark: #2d3748;
    --light: #ffffff;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: #4a5568;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(102, 126, 234, 0.95) !important;
    transition: all 0.3s ease;
}

.navbar.shadow-sm {
    box-shadow: var(--shadow);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 8px;
    margin: 0 5px;
    padding: 8px 16px !important;
}

.nav-link:hover {
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--dark) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff15"><polygon points="0,100 1000,0 1000,100"/></svg>');
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateX(-100%) rotate(0deg);
    }

    100% {
        transform: translateX(100%) rotate(360deg);
    }
}

.hero-img {
    width: 400px;
    height: 500px;
    object-fit: cover;
    border: 12px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

.hero-img:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-hover);
}

.btn {
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-warning {
    background: linear-gradient(45deg, #fbbf24, #f59e0b);
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

/* Cards */
.hover-card {
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.hover-card .card-title {
    color: var(--dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.card-img-top {
    transition: all 0.3s ease;
}

.hover-card:hover .card-img-top {
    transform: scale(1.1);
}

/* Stats Section */
.stat-card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card .card-body {
    padding: 24px;
}

/* Contact Info */
.contact-info h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

/* Galeri */
.galeri-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.galeri-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.4s ease;
}

.galeri-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.galeri-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.galeri-item:hover img {
    transform: scale(1.1);
}

.galeri-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: rgb(255, 255, 255);
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.galeri-item:hover .galeri-overlay {
    transform: translateY(0);
}

.gallery-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: 0.3s;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-card img {
    height: 220px;
    object-fit: cover;
}

/* Matkul Detail */
.matkul-hero {
    background: linear-gradient(135deg, var(--primary), var(--success));
    color: white;
    padding: 80px 0;
    position: relative;
}

.materi-list {
    list-style: none;
}

.materi-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.materi-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.download-btn {
    background: linear-gradient(45deg, var(--success), #38a169);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.download-btn:hover {
    color: white !important;
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

/* Footer */
footer {
    background: var(--dark);
}

footer a {
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-img {
        width: 480px;
        height: 680px;
        object-fit: cover;
        border-radius: 20px;
        box-shadow: var(--shadow);
    }

    .hero-section .col-lg-6:first-child {
        order: 2;
        text-align: center;
        margin-bottom: 2rem;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.animate__animated {
    animation-duration: 0.8s;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

/* Loading */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #b90606;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #6e3e3e;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* =========================
   SPLASH SCREEN PREMIUM
========================= */

body {
    overflow-x: hidden;
    background: #050816;
}

#splash-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background:
        radial-gradient(circle at top, rgba(0, 123, 255, 0.18), transparent 40%),
        linear-gradient(135deg, #020617, #050816, #0f172a);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;

    animation: splashFadeOut 1.2s ease forwards;
    animation-delay: 3s;
}

.splash-content {
    text-align: center;
    position: relative;
    z-index: 10;

    animation: contentFade 1.8s ease;
}

/* LOGO */
.logo-animation {
    position: relative;
    width: 150px;
    height: 150px;
    margin: auto;

    animation: logoScale 2s cubic-bezier(.17, .67, .35, 1.3);
}

.splash-logo {
    width: 500px;
    height: 500px;
    object-fit: cover;
    border-radius: 50%;

    border: 4px solid rgba(255, 255, 255, 0.15);

    box-shadow:
        0 0 25px rgba(0, 123, 255, 0.6),
        0 0 70px rgba(0, 123, 255, 0.4),
        0 0 120px rgba(0, 123, 255, 0.2);

    position: relative;
    z-index: 2;

    animation: logoFloat 5s ease-in-out infinite;
}

.circle-glow {
    position: absolute;
    inset: -25px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.5), transparent 70%);
    filter: blur(20px);

    animation: pulseGlow 3s infinite ease-in-out;
}

/* TEXT */
.welcome-text {
    margin-top: 40px;
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 8px;
    color: rgb(255, 255, 255);

    opacity: 0;
    animation:
        textFade 2s ease forwards,
        glowText 3s infinite ease-in-out;

    animation-delay: .5s;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 30px rgba(0, 123, 255, 0.7),
        0 0 60px rgba(0, 123, 255, 0.5);
}

.subtitle-text {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    letter-spacing: 3px;

    opacity: 0;
    transform: translateY(20px);
    animation: subtitleFade 1.5s ease forwards;
    animation-delay: 1.3s;
}

/* LOADING BAR */
.loading-bar {
    width: 280px;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    margin: 40px auto 0;
    overflow: hidden;

    backdrop-filter: blur(10px);
}

.loading-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00c6ff, #0072ff);

    border-radius: 50px;

    animation: loadingMove 3s ease forwards;
    box-shadow:
        0 0 20px rgba(0, 123, 255, 0.8),
        0 0 40px rgba(0, 123, 255, 0.5);
}

/* PARTICLES */
.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.6) 1px, transparent 1px);

    background-size: 80px 80px;

    animation: moveParticles 25s linear infinite;

    opacity: 0.15;
}

.particles::after {
    animation-duration: 40s;
    opacity: 0.08;
}

/* ANIMATIONS */

@keyframes logoScale {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes textFade {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

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

@keyframes glowText {

    0%,
    100% {
        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.5),
            0 0 30px rgba(0, 123, 255, 0.7),
            0 0 60px rgba(0, 123, 255, 0.5);
    }

    50% {
        text-shadow:
            0 0 20px rgba(255, 255, 255, 0.8),
            0 0 50px rgba(0, 123, 255, 1),
            0 0 100px rgba(0, 123, 255, 0.8);
    }
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: .7;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

@keyframes loadingMove {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

@keyframes moveParticles {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-200px);
    }
}

@keyframes splashFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes contentFade {
    from {
        opacity: 0;
        transform: scale(.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* MAIN PAGE TRANSITION */

.main-content {
    opacity: 0;
    transform: translateY(30px);
    animation: mainAppear 1.5s ease forwards;
    animation-delay: 3.2s;
}

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

/* RESPONSIVE */

@media (max-width: 768px) {

    .welcome-text {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .subtitle-text {
        font-size: .85rem;
        padding: 0 20px;
    }

    .logo-animation {
        width: 110px;
        height: 110px;
    }

    .loading-bar {
        width: 220px;
    }
}

html {
    scroll-behavior: smooth;
}

* {
    transition:
        background .3s ease,
        color .3s ease,
        transform .3s ease,
        opacity .3s ease;
}

.text-justify {
    text-align: justify;
}

/* ===== SPLASH SCREEN ===== */
#splash-screen {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0f172a, #111827, #1e293b);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 99999;
    animation: fadeOut 1.5s ease forwards;
    animation-delay: 5s;
}

/* CONTENT */
.splash-content {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 20px;
}

/* LOGO */
.splash-logo {
    width: 130px;
    height: 130px;
    object-fit: contain;
    margin-bottom: 25px;
    opacity: 0;
    transform: scale(0.5);
    animation: logoReveal 1.5s ease forwards;
}

/* TEXT */
.welcome-text {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    animation: fadeGlow 2s ease forwards;
    animation-delay: 1s;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.6),
        0 0 40px rgba(59, 130, 246, 0.8);
}

.welcome-subtext {
    margin-top: 15px;
    font-size: 1.2rem;
    color: #d1d5db;
    opacity: 0;
    animation: fadeGlow 2s ease forwards;
    animation-delay: 1.8s;
}

/* LOADER */
.loader {
    margin-top: 35px;
}

.loader span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 6px;
    border-radius: 50%;
    background: #fff;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader span:nth-child(1) {
    animation-delay: -0.32s;
}

.loader span:nth-child(2) {
    animation-delay: -0.16s;
}

/* PARTICLES */
.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 70%);
    animation: floatLight 10s infinite linear;
}

.particles::after {
    top: -200px;
    left: -150px;
}

.particles::before {
    bottom: -200px;
    right: -150px;
}

/* ANIMATIONS */
@keyframes logoReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes fadeGlow {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes floatLight {
    0% {
        transform: rotate(0deg) translateY(0px);
    }

    50% {
        transform: rotate(180deg) translateY(40px);
    }

    100% {
        transform: rotate(360deg) translateY(0px);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* RESPONSIVE */
@media(max-width: 768px) {
    .welcome-text {
        font-size: 2rem;
    }

    .welcome-subtext {
        font-size: 1rem;
    }

    .splash-logo {
        width: 100px;
        height: 100px;
    }
}