/* --- FONT --- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('/assets/fonts/PlusJakartaSans-VariableFont_wght.ttf') format('truetype');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* --- 1. DESIGN SYSTEM --- */
:root {
    --bg-page: #090c10;
    --bg-card: rgba(13, 17, 23, 0.6);
    --bg-card-hover: rgba(21, 28, 39, 0.8);
    --bg-input: #090c10b6;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --accent: #4b90ff;
    --border-color: #30363d;
    --border-hover: #4b90ff48;
    --radius: 24px;
    --padding: 28px;
    --gap: 20px;
}

/* --- 2. GLOBAL RESET --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

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

/* Paksa elemen form mewarisi font */
button,
input,
textarea,
select {
    font-family: inherit;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
    line-height: 1.6;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: moveBlob 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #4b90ff 0%, rgba(75, 144, 255, 0) 70%);
    animation-duration: 25s;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #8b5cf6 0%, rgba(139, 92, 246, 0) 70%);
    animation-duration: 30s;
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #2563eb 0%, rgba(37, 99, 235, 0) 70%);
    animation-duration: 22s;
    animation-delay: -10s;
}

@keyframes moveBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(300px, -100px) scale(1.1);
    }

    66% {
        transform: translate(-200px, 200px) scale(0.9);
    }

    100% {
        transform: translate(100px, -150px) scale(1);
    }
}

.container {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    grid-auto-flow: dense;
}

/* --- 3. CARD STYLES --- */
.card {
    background-color: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: var(--padding);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    min-height: 160px;
}

a.card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* --- 4. TYPOGRAPHY --- */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.3;
}

p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.meta {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    opacity: 0.8;
    margin-bottom: 6px;
    display: block;
    font-weight: 600;
}

.list-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.experience-desc-list {
    padding-left: 20px;
    list-style-type: disc;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.skill-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.project-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 7px;
    display: inline-block;
    width: fit-content;
    background: rgba(255, 255, 255, 0.03);
    padding: 0px 12px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
}

/* --- 5. COMPONENTS --- */
.col-span-1 {
    grid-column: span 1;
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-4 {
    grid-column: span 4;
}

.row-span-2 {
    grid-row: span 2;
}

.icon-box {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--text-main);
}

.icon-box svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.arrow-indicator {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0;
    transition: 0.3s;
}

a.card:hover .arrow-indicator {
    opacity: 1;
    transform: translate(2px, -2px);
    color: var(--text-main);
}

.nav-back {
    grid-column: span 4;
    display: flex;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 4px;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-back:hover {
    color: var(--text-main);
    gap: 12px;
}

.expand-item {
    text-align: center;
    cursor: pointer;
    color: var(--accent);
    font-weight: 500;
    font-size: 0.9rem
}

.resume-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.resume-item {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: 0.2s;
    padding-right: 10px;
    position: relative;
}

.resume-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.resume-item:hover h3 {
    color: var(--accent);
}

.resume-item:hover:after {
    content: '↗';
    position: absolute;
    right: 0;
    top: 20px;
    color: var(--accent);
    font-size: 1.4rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: 0.2s;
}

.tag:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-main);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.project-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 0;
    transition: 0.3s;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.project-content {
    padding: 20px;
    gap: 4px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.cta-card {
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--text-main);
    color: #000;
    padding: 12px 28px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.2s;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    color: var(--text-main);
    padding: 12px 28px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.2s;
    margin-top: 10px;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
    transform: scale(1.03);
}

/* --- HERO CARD STYLES --- */
.hero-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
}

.status-badge {
    width: fit-content;
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 20px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
}

.hero-text .btn-primary {
    margin-top: auto;
    align-self: flex-start;
}



/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    /* Changed from none to allow transitions */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 800px;
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Mencegah modal utama scroll */
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10;
}

.close-modal:hover {
    color: var(--text-main);
}

/* --- FORM STYLES --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: 0.2s;
}

.form-textarea {
    resize: none;
    min-height: 140px;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* --- DETAIL POPUP STYLES --- */
/* Header tetap diam */
.detail-header {
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    /* Mencegah header mengecil */
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
}

.detail-subtitle {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 500;
    display: block;
}

.detail-meta-row {
    display: flex;
    gap: 0px 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0px 9px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: 0.2s;
}

.detail-meta-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-main);
}

/* Area yang bisa di-scroll (Body + Gallery) */
.detail-scroll-area {
    overflow-y: auto;
    flex-grow: 1;
    padding-top: 20px;
    /* Jarak dari garis header */

    /* Custom Scrollbar - Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
}

/* Webkit Browsers (Chrome, Safari, Edge) */
.detail-scroll-area::-webkit-scrollbar {
    width: 8px;
}

.detail-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.detail-scroll-area::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.detail-scroll-area::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.detail-body {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.detail-body ul,
.detail-body ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.detail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 24px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
    border: 1px solid var(--border-color);
    flex: 1 1 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: color-mix(in srgb, var(--bg-card), transparent 50%);
    color: var(--text-main);
    font-size: 0.75rem;
    padding: 4px;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-more-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-card);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(2px);
    transition: 0.2s;
}

.gallery-more-overlay:hover {
    background-color: var(--bg-card-hover);
}

/* --- LIGHTBOX STYLES --- */
.lightbox-overlay {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    visibility: visible;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    object-fit: contain;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-caption-text {
    color: #ccc;
    margin: 15px 20px 0;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
}

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
}

.close-lightbox:hover {
    color: var(--accent);
}


/* --- ANIMATIONS --- */
@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

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

.anim-enter {
    opacity: 0;
    /* Hide initially to prevent flash before delay */
    animation: slideDownFade 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes textGlow {
    30% {
        transform: translateY(-2px);
        text-shadow: 0 0 15px var(--accent);
    }
}

.glow-effect {
    animation: textGlow 1.2s ease-in-out;
}

/* --- RESPONSIVE BREAKPOINTS --- */

@media (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }

    .col-span-2 {
        grid-column: span 1;
    }

    .hero-card {
        grid-column: span 2;
        order: 0;
    }

    .card:nth-of-type(6) {
        grid-column: span 2;
    }

    .col-span-4,
    .nav-back {
        grid-column: span 2;
    }

    .row-span-2 {
        grid-row: auto;
    }
}

@media (max-width: 640px) {
    body {
        padding: 20px 26px;
    }

    .container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .card {
        padding: 28px 20px;
        min-height: auto;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.25rem;
    }

    .btn-primary {
        width: 100%;
    }

    /* Small cards occupy 1 column (half width) */
    .col-span-1 {
        grid-column: span 1;
        width: auto;
    }

    /* Larger cards occupy 2 columns (full width) */
    .col-span-2,
    .col-span-4,
    .nav-back {
        grid-column: span 2;
        width: auto;
    }

    /* Reset row spans to let content dictate height */
    .row-span-2 {
        grid-row: auto;
    }

    .hero-card {
        order: 0;
    }

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

    .gallery-item {
        flex-basis: calc(50% - 10px);
    }

    .cta-card {
        padding: 40px 20px;
    }

    .hero-layout {
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .status-badge {
        margin-bottom: 0;
    }

    .hero-text {
        align-items: center;
    }

    .hero-text .btn-primary {
        align-self: center;
    }
}