/* =============================================
   VARIABLES & RESET
   ============================================= */
:root {
    --bg-dark:       #06090f;
    --bg-card:       rgba(10, 18, 30, 0.85);
    --border-glow:   rgba(0, 220, 255, 0.25);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --cyan:          #00dcff;
    --cyan-dim:      rgba(0, 220, 255, 0.15);
    --cyan-mid:      rgba(0, 220, 255, 0.5);
    --orange:        #ff7a00;
    --orange-dim:    rgba(255, 122, 0, 0.15);
    --green:         #00ff9d;
    --green-dim:     rgba(0, 255, 157, 0.12);
    --purple:        #a855f7;
    --purple-dim:    rgba(168, 85, 247, 0.15);
    --text-white:    #f0f4ff;
    --text-muted:    rgba(180, 200, 230, 0.6);
    --font-display:  'Orbitron', monospace;
    --font-body:     'Rajdhani', sans-serif;
    --font-mono:     'Share Tech Mono', monospace;
    --nav-h:         84px;
    --radius-lg:     18px;
    --radius-md:     12px;
    --transition:    0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* =============================================
   CANVAS BACKGROUND
   ============================================= */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* =============================================
   NAVBAR
   ============================================= */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 20px;
}

.nav-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(8, 16, 28, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px 24px;
    box-shadow:
        0 0 0 1px rgba(0, 220, 255, 0.06),
        0 8px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.06);
    position: relative;
    z-index: 1;
}

.nav-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-white);
    text-shadow: 0 0 20px rgba(0, 220, 255, 0.4);
}

.nav-icon-btn {
    background: none;
    border: none;
    color: rgba(180, 200, 230, 0.5);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background 0.2s;
}
.nav-icon-btn:hover {
    color: var(--cyan);
    background: var(--cyan-dim);
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 20px;
    background: rgba(8, 16, 28, 0.95);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(0,220,255,0.1);
    min-width: 200px;
    z-index: 200;
}
.mobile-menu.hidden { display: none; }

.menu-link {
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.menu-link:hover { color: var(--cyan); }

.menu-contact-btn {
    background: transparent;
    border: 1px solid var(--cyan-mid);
    color: var(--cyan);
    padding: 10px 20px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.menu-contact-btn:hover {
    background: var(--cyan-dim);
    box-shadow: 0 0 20px rgba(0,220,255,0.2);
}

/* =============================================
   MAIN
   ============================================= */
main {
    position: relative;
    z-index: 1;
    flex: 1;
    padding-top: calc(var(--nav-h) + 30px);
    padding-bottom: 40px;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =============================================
   PROFILE SECTION
   ============================================= */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 750px;
    margin-bottom: 40px;
}

/* Avatar */
.avatar-wrapper {
    position: relative;
    margin-bottom: 28px;
}
.avatar-frame {
    width: 130px;
    height: 130px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0,220,255,0.3);
    background: rgba(10,20,40,0.8);
    box-shadow: 0 0 40px rgba(0,220,255,0.15), 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}
.avatar-placeholder {
    display: none;
    align-items: center;
    justify-content: center;
    color: rgba(0,220,255,0.3);
    width: 100%;
    height: 100%;
}
.avatar-glow {
    position: absolute;
    inset: -15px;
    background: radial-gradient(ellipse at center, rgba(0,220,255,0.12) 0%, transparent 70%);
    border-radius: 30px;
    z-index: 0;
    animation: avatarPulse 3s ease-in-out infinite;
}
@keyframes avatarPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Name */
.profile-name {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #a8d8ff 40%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: none;
}

.profile-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.03em;
    max-width: 500px;
    line-height: 1.6;
    margin-bottom: 28px;
}

/* =============================================
   SKILLS BOX
   ============================================= */
.skills-box {
    width: 100%;
    background: rgba(0, 30, 50, 0.6);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-lg);
    padding: 20px 28px 14px;
    box-shadow:
        inset 0 1px 0 rgba(0,220,255,0.08),
        0 4px 30px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}
.skills-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan-mid), transparent);
}

.skills-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 16px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.skills-toggle:hover {
    color: var(--text-white);
    background: rgba(255,255,255,0.04);
}
.skills-toggle svg { flex-shrink: 0; }

.skills-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 32px;
    text-align: left;
    overflow: hidden;
    max-height: 200px;
    transition: max-height 0.5s ease, opacity 0.4s ease;
}
.skills-list.collapsed {
    max-height: 0;
    opacity: 0;
}

.skill-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(200, 220, 240, 0.85);
    line-height: 1.5;
}
.skill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    margin-top: 5px;
    flex-shrink: 0;
    box-shadow: 0 0 6px var(--cyan);
}

.skills-hint {
    font-size: 0.72rem;
    color: rgba(150, 170, 200, 0.45);
    font-style: italic;
    margin-top: 12px;
    letter-spacing: 0.03em;
}

/* =============================================
   CARDS SECTION — ExploreCard Style
   ============================================= */
.cards-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
}

.cards-track {
    width: 100%;
    display: flex;
    gap: 12px;
    align-items: stretch;
    height: 440px;
    position: relative;
}

/* Individual Card */
.service-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.08);
    transition:
        flex 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    flex: 0.5;
    min-width: 62px;
}

.service-card.active {
    flex: 3.5;
    border-color: rgba(0,220,255,0.3);
    box-shadow:
        0 0 0 1px rgba(0,220,255,0.15),
        0 20px 60px rgba(0,0,0,0.6),
        0 0 80px rgba(0,220,255,0.08);
}

/* Card Background layers */
.card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease, opacity 0.4s ease;
}
.service-card:hover .card-bg { transform: scale(1.03); }

.card-bg-1 {
    background:
        linear-gradient(180deg, rgba(0,20,40,0) 20%, rgba(0,30,60,0.97) 100%),
        radial-gradient(ellipse at 30% 20%, rgba(0,180,255,0.25) 0%, transparent 60%),
        linear-gradient(135deg, #061828 0%, #0a2040 50%, #062030 100%);
}
.card-bg-2 {
    background:
        linear-gradient(180deg, rgba(10,5,30,0) 20%, rgba(20,10,50,0.97) 100%),
        radial-gradient(ellipse at 70% 20%, rgba(168,85,247,0.25) 0%, transparent 60%),
        linear-gradient(135deg, #120820 0%, #1a0a30 50%, #100820 100%);
}
.card-bg-3 {
    background:
        linear-gradient(180deg, rgba(0,10,20,0) 0%, rgba(0,15,35,0.95) 100%),
        radial-gradient(ellipse at 50% 30%, rgba(0,220,255,0.2) 0%, rgba(100,200,100,0.1) 50%, transparent 70%),
        linear-gradient(160deg, #061525 0%, #041020 40%, #061828 100%);
}
.card-bg-4 {
    background:
        linear-gradient(180deg, rgba(20,5,10,0) 20%, rgba(40,8,15,0.97) 100%),
        radial-gradient(ellipse at 60% 20%, rgba(255,100,50,0.2) 0%, transparent 60%),
        linear-gradient(135deg, #180808 0%, #250a0a 50%, #180606 100%);
}

/* Decorative scene for bg-3 (active card visual) */
.card-bg-3::after {
    content: '';
    position: absolute;
    bottom: 35%;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(ellipse at center, rgba(0,220,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: cardGlow 3s ease-in-out infinite;
}
@keyframes cardGlow {
    0%,100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.2); }
}

/* Top label row */
.card-label-top {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 3;
}
.card-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: rgba(200,220,240,0.7);
    letter-spacing: 0.05em;
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
}
.card-num {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: rgba(200,220,240,0.5);
    background: rgba(0,0,0,0.3);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Collapsed content — vertical rotated title */
.card-content-collapsed {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 1;
    transition: opacity 0.3s ease;
}
.service-card.active .card-content-collapsed {
    opacity: 0;
    pointer-events: none;
}
.card-title-rotated {
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(200,220,240,0.8);
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-overflow: ellipsis;
    overflow: hidden;
    max-height: 280px;
}

/* Expanded content */
.card-content-expanded {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 22px;
    z-index: 3;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(0,5,15,0.9) 0%, transparent 100%);
    border-top: 1px solid rgba(0,220,255,0.08);
}
.service-card.active .card-content-expanded {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(0,220,255,0.08);
    border: 1px solid rgba(0,220,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--cyan);
}
.card-bg-2 ~ .card-content-expanded .card-icon { color: var(--purple); background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.2); }
.card-bg-4 ~ .card-content-expanded .card-icon { color: var(--orange); background: rgba(255,122,0,0.08); border-color: rgba(255,122,0,0.2); }

.card-enter-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.card-title-big {
    font-family: var(--font-display);
    font-size: clamp(0.8rem, 1.4vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-white);
    margin-bottom: 14px;
    text-transform: uppercase;
    line-height: 1.3;
}

.card-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.card-list li {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: rgba(180,200,230,0.75);
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.card-list li::before {
    content: '▸';
    color: var(--cyan);
    font-size: 0.65rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Cards Navigation */
.cards-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cards-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10,20,40,0.7);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}
.cards-nav-btn:hover {
    color: var(--cyan);
    border-color: var(--cyan-mid);
    background: var(--cyan-dim);
    box-shadow: 0 0 15px rgba(0,220,255,0.15);
}

.cards-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}
.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: all 0.3s;
}
.dot.active {
    width: 20px;
    border-radius: 3px;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(0,220,255,0.6);
}

/* =============================================
   FOOTER
   ============================================= */
#footer {
    position: relative;
    z-index: 1;
    padding: 0 20px 20px;
}
.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    background: rgba(6, 12, 24, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-top: 1px solid rgba(0,220,255,0.12);
    border-radius: var(--radius-lg);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow:
        0 0 0 1px rgba(0,220,255,0.04),
        0 -4px 30px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(0,220,255,0.06);
    flex-wrap: wrap;
}
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.footer-copy {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}
.footer-social {
    display: flex;
    gap: 14px;
    align-items: center;
}
.social-icon {
    color: rgba(180,200,230,0.4);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}
.social-icon:hover {
    color: var(--cyan);
    transform: translateY(-2px);
}
.footer-contact-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-white);
    padding: 9px 28px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}
.footer-contact-btn:hover {
    background: var(--cyan-dim);
    border-color: var(--cyan-mid);
    color: var(--cyan);
    box-shadow: 0 0 20px rgba(0,220,255,0.15);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .skills-list {
        grid-template-columns: 1fr;
    }
    .cards-track {
        height: 380px;
        gap: 8px;
    }
    .service-card {
        min-width: 50px;
    }
    .card-title-big {
        font-size: 0.85rem;
    }
    .card-list li {
        font-size: 0.78rem;
    }
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .footer-contact-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    main {
        padding-top: calc(var(--nav-h) + 16px);
        padding-left: 14px;
        padding-right: 14px;
    }
    .cards-track {
        height: 340px;
    }
    .card-title-rotated {
        font-size: 0.55rem;
    }
    .card-tag {
        display: none;
    }
    .nav-inner {
        padding: 12px 16px;
    }
    .nav-title {
        font-size: 0.95rem;
    }
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb {
    background: rgba(0,220,255,0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(0,220,255,0.4); }

/* =============================================
   SWAL CUSTOM
   ============================================= */
.swal2-popup {
    background: rgba(6, 14, 28, 0.97) !important;
    border: 1px solid rgba(0,220,255,0.2) !important;
    color: var(--text-white) !important;
    font-family: var(--font-body) !important;
    border-radius: 20px !important;
}
.swal2-title { color: var(--text-white) !important; font-family: var(--font-display) !important; }
.swal2-html-container { color: var(--text-muted) !important; }
.swal2-confirm {
    background: var(--cyan) !important;
    color: #000 !important;
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.profile-section  { animation: fadeInUp 0.7s ease both; }
.cards-section    { animation: fadeInUp 0.7s ease 0.15s both; }
#footer           { animation: fadeInUp 0.7s ease 0.25s both; }