@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* =========================
    RESET & BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.section-title {
    font-family: 'Shippori Mincho', serif;
}

:root {
    --bg-main: #09090b;
    --bg-secondary: #0f1014;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-1: #3b82f6;
    --accent-2: #8b5cf6;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(20, 20, 25, 0.4);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* =========================
    PRELOADER
========================= */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-text {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite ease-in-out;
}

/* =========================
    SCROLL PROGRESS
========================= */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    z-index: 10000;
    width: 0%;
    box-shadow: 0 0 10px var(--accent-2);
}

/* =========================
    NAVBAR
========================= */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    height: 60px;
    padding: 0 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    gap: 3rem;
}

.navbar .logo {
    display: none;
    /* Hidden inside the island by default to keep it compact */
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 4rem;
    /* Perfect balanced distance */
    align-items: center;
}

.navbar ul li a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.navbar ul li a:hover {
    color: var(--text-main);
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.navbar ul li a:hover::after {
    width: 100%;
}

/* =========================
    GLOBAL SECTION
========================= */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 100px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

/* =========================
    HERO
========================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding-top: 80px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title .typing-text {
    background: linear-gradient(to right, var(--accent-1), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 99px;
    background: var(--text-main);
    color: var(--bg-main);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Minimalist Images */
.minimal-img {
    max-width: 450px;
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    z-index: 2;
    filter: grayscale(80%) contrast(1.1);
    transition: all 0.5s ease;
}

.minimal-img:hover {
    filter: grayscale(0%) contrast(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

.wide-img {
    aspect-ratio: 16/9;
    max-width: 100%;
    border-radius: 20px;
    filter: grayscale(20%) contrast(1.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

@keyframes deepLoopFloat {
    0% {
        transform: translateZ(30px) translateY(0px) scale(1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    }

    50% {
        transform: translateZ(60px) translateY(-15px) scale(1.05);
        box-shadow: 0 40px 80px rgba(234, 88, 12, 0.6);
    }

    100% {
        transform: translateZ(30px) translateY(0px) scale(1);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    }
}

.animated-deep {
    animation: deepLoopFloat 5s ease-in-out infinite;
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
}

.hero-visual::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: linear-gradient(45deg, var(--accent-1), var(--accent-2));
    border-radius: 30px;
    z-index: 1;
    filter: blur(20px);
    opacity: 0.3;
}

/* Floating Tech Icons */
.floating-tech {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 3;
    animation: float 4s ease-in-out infinite;
}

.tech-1 {
    top: 10%;
    left: -20px;
    color: #ef4444;
    /* Laravel Red */
    animation-delay: 0s;
}

.tech-2 {
    bottom: 20%;
    right: -30px;
    color: #777bb3;
    /* PHP Purple */
    animation-delay: 1.5s;
}

.tech-3 {
    top: 40%;
    right: -10px;
    color: #f7df1e;
    /* JS Yellow */
    animation-delay: 3s;
}

/* =========================
    ABOUT
========================= */
.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
}

.about-badges {
    position: absolute;
    bottom: -15px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.badge {
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.about-content {
    font-size: 1.15rem;
    color: var(--text-muted);
}

/* =========================
    SKILLS (BUTTON STYLE)
========================= */
.skills-button-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    max-width: 950px;
    margin: 40px auto;
}

.skill-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 30px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    animation: skillFloat 6s infinite alternate ease-in-out;
}

.skill-btn:nth-child(odd) {
    animation-name: skillFloatReverse;
    animation-duration: 7s;
}

.skill-btn:nth-child(3n) {
    animation-duration: 8.5s;
}

@keyframes skillFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
    }

    33% {
        transform: translateY(-10px) translateX(15px) scale(1.02);
    }

    66% {
        transform: translateY(10px) translateX(-10px) scale(0.98);
    }

    100% {
        transform: translateY(0) translateX(0) scale(1);
    }
}

@keyframes skillFloatReverse {
    0% {
        transform: translateY(0) translateX(0) scale(1);
    }

    33% {
        transform: translateY(10px) translateX(-15px) scale(0.98);
    }

    66% {
        transform: translateY(-10px) translateX(10px) scale(1.02);
    }

    100% {
        transform: translateY(0) translateX(0) scale(1);
    }
}

.skill-btn:hover {
    transform: translateY(-8px) scale(1.1) !important;
    background: rgba(15, 23, 42, 0.95);
    border-color: #f97316;
    /* Autumn orange */
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.5);
    animation-play-state: paused;
}

.skill-btn-icon {
    font-size: 1.35rem;
    color: #f97316;
    /* Autumn orange */
}

.skill-btn-name {
    flex: 1;
}

.skill-btn-level {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* =========================
    RESUME (TIMELINE)
========================= */
.resume-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 90px;
    margin-top: 100px;
    padding: 0 10px;
}

.resume-header {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 35px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 5px;
    height: calc(100% - 10px);
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    position: relative;
    margin-bottom: 45px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    animation: timelineFloat 8s infinite alternate ease-in-out;
}

.timeline-item:nth-child(even) {
    animation-duration: 9.5s;
    animation-direction: alternate-reverse;
}

@keyframes timelineFloat {
    0% {
        transform: translateY(0px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    50% {
        transform: translateY(-8px);
        box-shadow: 0 15px 25px rgba(234, 88, 12, 0.15);
    }

    100% {
        transform: translateY(0px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
}

.timeline-item:hover {
    transform: translateX(12px) translateY(-5px) !important;
    border-color: rgba(234, 88, 12, 0.5);
    box-shadow: 0 20px 40px rgba(234, 88, 12, 0.3);
    animation-play-state: paused;
}

.timeline-dot {
    position: absolute;
    left: -40px;
    top: 28px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ea580c;
    box-shadow: 0 0 10px rgba(234, 88, 12, 0.6);
    border: 3px solid var(--bg-main);
}

.timeline-date {
    font-size: 0.85rem;
    color: #fbbf24;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 5px;
}

.timeline-org {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .resume-section {
        grid-template-columns: 1fr;
    }
}

/* =========================
    PROJECTS
========================= */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(139, 92, 246, 0.05);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* =========================
    CONTACT
========================= */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
}

.contact-form {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 24px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-2);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wa-card {
    background: linear-gradient(145deg, rgba(20, 20, 25, 0.8), rgba(0, 0, 0, 0.4));
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.wa-icon {
    font-size: 3rem;
    color: #25D366;
    margin-bottom: 1rem;
}

.wa-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.wa-btn {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 99px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wa-btn:hover {
    background: #25D366;
    color: #fff;
}

/* =========================
    FOOTER
========================= */
.footer {
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 60px;
}

/* =========================
    RESPONSIVE
========================= */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-desc {
        margin: 0 auto 2.5rem;
    }

    .about-wrapper,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .navbar {
        width: 90%;
        padding: 15px 25px !important;
        height: auto !important;
        flex-direction: column;
        align-items: flex-end;
        border-radius: 20px;
        gap: 0;
        overflow: hidden;
    }
    .hamburger {
        display: block !important;
    }
    .navbar ul {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 1.5rem;
        padding: 15px 0 10px 0;
        margin-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .navbar ul.active {
        display: flex !important;
    }
    .navbar ul li a {
        font-size: 1rem;
        display: block;
        padding: 5px 0;
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    filter: blur(10px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

/* Alerts */
.error-list {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    list-style-position: inside;
}

.success-msg {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #86efac;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}