/* =========================================
   VARIABLES & BASE
   ========================================= */
:root {
    --bg-dark: #020617;
    --text-white: #f8fafc;
    --accent-green: #34d399;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    font-family: var(--font-body);
    color: var(--text-white);
    overflow-x: hidden;
    position: relative;
}

/* APPLE-STYLE NOISE TEXTURE */
body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; opacity: 0.05; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 10px; transition: background 0.3s ease; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); }

/* AURORA BACKGROUND */
.aurora-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; overflow: hidden; }
.aurora-light { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.5; animation: drift 20s infinite alternate; }
.light-1 { width: 70vw; height: 70vw; background: #7e22ce; top: -20%; left: -10%; animation: drift 25s infinite alternate, shiftColor 60s infinite linear; }
.light-2 { width: 60vw; height: 60vw; background: #0891b2; bottom: -20%; right: -10%; animation-delay: -5s; }
.light-3 { width: 50vw; height: 50vw; background: #059669; top: 30%; left: 30%; opacity: 0.3; }
@keyframes drift { 0% { transform: translate(0,0); } 100% { transform: translate(30px, 50px); } }
@keyframes shiftColor { 0% { filter: blur(100px) hue-rotate(0deg); } 100% { filter: blur(100px) hue-rotate(360deg); } }

/* PRELOADER */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-dark); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.loader-text { font-family: var(--font-heading); font-size: 1.5rem; color: var(--accent-green); letter-spacing: 2px; animation: pulseText 2s infinite; }
@keyframes pulseText { 0% { opacity: 0.5; transform: scale(0.95); } 50% { opacity: 1; transform: scale(1); } 100% { opacity: 0.5; transform: scale(0.95); } }
.loaded { opacity: 0; visibility: hidden; }

/* NAVBAR */
.navbar-pill {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 1000;
    display: flex; align-items: center; gap: 8px;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 50px;
    padding: 6px 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: all 0.3s ease;
    max-width: 95vw;
}
.nav-link {
    text-decoration: none; color: #94a3b8; font-family: 'Inter', sans-serif;
    font-size: 0.85rem; font-weight: 500; padding: 8px 16px; border-radius: 30px;
    transition: all 0.3s ease; white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.nav-link.active { background: #ffffff; color: #000000; font-weight: 700; box-shadow: 0 2px 10px rgba(255, 255, 255, 0.3); transform: scale(1.05); }

.lang-switch { margin-left: 12px; display: inline-flex; gap: 6px; align-items: center; }
.lang-link { color: #cbd5e1; background: transparent; padding: 6px 10px; border-radius: 8px; font-weight:700; text-decoration:none; font-size:0.85rem; }
.lang-link:hover { background: rgba(255,255,255,0.06); color: #fff; }

.lang-link.active-lang {
    background: #ffffff; color: #000; box-shadow: 0 4px 14px rgba(0,0,0,0.25); transform: scale(1.02);
}

/* Dynamic Island Language Switcher for Mobile */
.lang-switch-mobile {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.lang-island {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 10px 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.lang-island:active {
    transform: scale(0.95);
}

.lang-island-icon {
    font-size: 1.1rem;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lang-island.expanded .lang-island-icon {
    transform: rotate(180deg);
}

.lang-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.lang-options.show {
    max-height: 150px;
    opacity: 1;
    pointer-events: all;
}

.lang-options .lang-link {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 10px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
    min-width: 70px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: scale(0.8);
}

.lang-options.show .lang-link {
    transform: scale(1);
}

.lang-options .lang-link:hover {
    background: rgba(30, 41, 59, 0.95);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.lang-options .lang-link.active-lang {
    background: linear-gradient(135deg, #34d399, #059669);
    color: #000;
    border-color: rgba(52, 211, 153, 0.5);
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.4);
}

/* Mobile navbar improvements */
@media (max-width: 768px) {
    /* Hide language switcher from navbar on mobile */
    .navbar-pill .lang-switch {
        display: none;
    }
    
    /* Show floating language switcher */
    .lang-switch-mobile {
        display: flex;
    }
    
    .navbar-pill {
        top: 20px;
        padding: 6px 12px;
        gap: 5px;
        max-width: calc(100vw - 30px);
        left: 50%;
        transform: translateX(-50%);
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .navbar-pill::-webkit-scrollbar {
        display: none;
    }
    .nav-link {
        font-size: 0.8rem;
        padding: 7px 12px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .navbar-pill {
        gap: 4px;
        padding: 5px 10px;
        max-width: calc(100vw - 20px);
    }
    .nav-link {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    .lang-switch-mobile {
        right: 15px;
        bottom: 15px;
    }
    .lang-island {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}

/* HERO */
.hero { height: 90vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; z-index: 1; padding: 0 20px; }
.hero h1 { font-family: var(--font-heading); font-size: 4rem; line-height: 1.1; margin-bottom: 10px; }
.hero .highlight { color: var(--accent-green); }
.hero-desc { margin-top: 20px; font-size: 1.2rem; color: #94a3b8; max-width: 600px; margin: 20px auto 0 auto; }
.fade-in { opacity: 0; transform: translateY(20px); animation: fadeIn 1s forwards; }
.delay-1 { animation-delay: 0.2s; } .delay-2 { animation-delay: 0.4s; }
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

/* BUTTONS */
.btn-primary {
    background: var(--accent-green); color: var(--bg-dark);
    text-decoration: none; font-weight: 700; padding: 12px 24px; border-radius: 50px;
    border: none; cursor: pointer; display: inline-block; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 20px -5px rgba(52, 211, 153, 0.4);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.05); background: #ffffff; box-shadow: 0 20px 30px -5px rgba(52, 211, 153, 0.6); }

/* ABOUT */
.container { max-width: 1000px; margin: 0 auto; padding: 100px 20px; }
.about-grid { display: grid; grid-template-columns: 350px 1fr; gap: 60px; align-items: center; }
.arch-photo { width: 100%; max-width: 320px; height: 400px; object-fit: cover; border-radius: 200px 200px 20px 20px; border: 3px solid rgba(255,255,255,0.1); }
.about-text h2 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 20px; }
.about-text p { font-size: 1.1rem; color: #cbd5e1; margin-bottom: 15px; line-height: 1.6; }

/* EXPERIENCE (GRID) */
.section-header.center-aligned { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-family: var(--font-heading); font-size: 2.5rem; }
.badge { background: rgba(255,255,255,0.1); padding: 5px 15px; border-radius: 20px; display: inline-block; font-size: 0.8rem; margin-top: 10px; color: #94a3b8; }
.career-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; width: 100%; }
.career-card {
    background: rgba(30, 41, 59, 0.4); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px; padding: 30px; display: flex; flex-direction: column; height: 100%;
    transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.career-card:hover { transform: translateY(-8px); border-color: var(--accent-green); background: rgba(30, 41, 59, 0.8); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.year-badge { font-family: monospace; font-size: 0.8rem; color: var(--accent-green); background: rgba(52, 211, 153, 0.1); padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.connector-line { flex-grow: 1; height: 1px; background: rgba(255,255,255,0.1); margin-left: 15px; }
.card-content h3 { font-family: var(--font-heading); font-size: 1.3rem; color: #fff; margin-bottom: 5px; line-height: 1.3; }
.company { display: block; font-size: 0.9rem; color: #94a3b8; font-weight: 500; margin-bottom: 15px; }
.card-content p { font-size: 0.95rem; color: #cbd5e1; line-height: 1.6; margin-top: auto; }

/* =========================================
   SERVICES SECTION (CARDS + GRID)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns on desktop */
    gap: 24px;
    width: 100%;
    margin-top: 20px;
}

/* Center and constrain common sections for symmetric layout */
.hero .hero-content { max-width: 940px; margin: 0 auto; text-align: center; }
.section-header.center-aligned { display: flex; flex-direction: column; align-items: center; }

/* Make service cards consistent width and centered */
.services-grid { justify-items: center; }
.service-card { width: 100%; max-width: 320px; }

/* Tech stack alignment */
.tech-stack-row { justify-content: center; }

/* Portfolio cards centered and constrained */
.portfolio-grid { justify-items: center; }
.portfolio-card { width: 100%; max-width: 360px; }
.portfolio-img img { height: 220px; }

/* About text narrower for symmetry */
.about-text { max-width: 560px; }

.service-card {
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.service-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}
.service-icon {
    font-size: 1.6rem;
    width: 72px; height: 72px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); color: #fff;
}
.service-price { display: none; }

.service-body h3 {
    font-family: var(--font-heading);
    font-size: 1.08rem; margin: 0 0 8px 0; color: #fff; line-height: 1.2;
}
.service-features {
    list-style: none; padding-left: 0; margin: 0; color: #cbd5e1;
    display: grid; gap: 6px; font-size: 0.92rem;
}
.service-features li { display: flex; align-items: center; gap: 8px; }
.service-features li::before { content: '•'; color: rgba(255,255,255,0.12); font-size: 1.1rem; line-height: 1; }

/* Make card content stretch so price stays top-right and features stay near bottom */
.service-card { justify-content: space-between; }
.service-body { margin-top: 8px; }

/* TECH STACK ROW */
.tech-stack-row {
    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 18px;
}
.tech-chip {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.04);
    color: #cbd5e1; border-radius: 12px; font-weight: 600; font-size: 0.95rem;
}
.tech-chip i { font-size: 1.15rem; color: #fff; }
.tech-name { color: #94a3b8; font-weight: 600; margin-left: 6px; }

/* Enhanced tech-chip styles with logo badges */
.tech-stack-row { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; align-items:center; }
.tech-chip { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:14px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px solid rgba(255,255,255,0.04); box-shadow: 0 6px 16px rgba(2,6,23,0.35); transition: transform .18s ease, box-shadow .18s ease; }
.tech-chip:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(2,6,23,0.45); }
.tech-chip .logo-img { width:40px; height:40px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; box-shadow: inset 0 -6px 12px rgba(0,0,0,0.15); background: rgba(255,255,255,0.02); padding:6px; }
.tech-chip .logo-img img { width:100%; height:100%; object-fit:contain; display:block; }
.tech-chip .tech-name { color:#e6eef8; font-weight:700; font-size:0.95rem; }

/* Compact Tech Badge for About Section */
.tech-badge {
    display: inline-block;
    padding: 6px 14px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 20px;
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}
.tech-badge:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(16, 185, 129, 0.12));
    border-color: rgba(52, 211, 153, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2);
}

@media (max-width: 700px) {
    .tech-chip { padding: 8px 10px; gap:8px; }
    .tech-chip .logo { width:34px; height:34px; font-size:0.85rem; }
    .tech-badge { padding: 5px 12px; font-size: 0.8rem; }
}

/* PORTFOLIO GRID */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.portfolio-card { position: relative; overflow: hidden; border-radius: 16px; display: block; text-decoration: none; color: inherit; }
.portfolio-img img { width: 100%; height: 240px; object-fit: cover; display: block; filter: saturate(0.95) contrast(0.95); }
.portfolio-meta { position: absolute; left: 16px; bottom: 14px; z-index: 3; color: #fff; }
.portfolio-meta h3 { margin: 0; font-size: 1.05rem; font-family: var(--font-heading); }
.portfolio-meta .muted { color: #94a3b8; font-size: 0.85rem; }
.portfolio-card::after { content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(2,6,23,0.0) 40%, rgba(2,6,23,0.6) 100%); z-index: 2; }

@media (max-width: 1000px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .portfolio-grid { grid-template-columns: 1fr; }
    .portfolio-img img { height: 160px; }
}

/* CONTACT CTA BUTTONS (Large glass buttons used in footer) */
.contact-cta { display: flex; gap: 16px; justify-content: center; margin: 30px 0 10px 0; }
.cta-btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; border-radius: 14px; text-decoration: none; color: #fff; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); font-weight: 700; }
.cta-btn .icon { font-size: 1.25rem; }
.cta-btn.whatsapp { background: linear-gradient(90deg, rgba(52,211,153,0.12), rgba(52,211,153,0.06)); border-color: rgba(52,211,153,0.15); }
.cta-btn.linkedin { background: linear-gradient(90deg, rgba(56,189,248,0.08), rgba(56,189,248,0.02)); border-color: rgba(56,189,248,0.14); }
.cta-btn.fastwork { background: linear-gradient(90deg, rgba(168,85,247,0.06), rgba(168,85,247,0.02)); border-color: rgba(168,85,247,0.12); }

/* CONTACT FORM */
.contact-grid { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 940px; margin: 30px auto 0; align-items: center; }
.contact-form { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.sr-only {
    border: 0 !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    -webkit-clip-path: inset(50%) !important;
    clip-path: inset(50%) !important;
    height: 1px !important; width: 1px !important; 
    margin: -1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; white-space: nowrap !important;
}
.contact-form { max-width: 720px; width: 100%; padding: 14px; margin: 0 auto; }
.contact-form .glass-input-premium { width: 100%; }

/* Contact form specific tweaks */
.contact-form textarea.glass-input-premium {
    min-height: 90px;
    max-height: 160px;
    resize: vertical;
}

/* Small centered toast for contact feedback */
#contact-toast {
    position: fixed;
    top: 22px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(34,197,94,0.95);
    color: #082f2e;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(2,6,23,0.45);
    z-index: 9999;
    opacity: 0;
    transition: opacity .18s ease, transform .2s ease;
    pointer-events: none;
}
#contact-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Inline feedback banner inside contact form */
.contact-feedback {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(34,197,94,0.95);
    color: #082f2e;
    font-weight: 700;
    margin-top: 12px;
}
.contact-feedback.visible { display: flex; }

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; }
    .contact-form { order: 1; }
    .social-grid { order: 2; }
}

/* Prevent accidental overlap with fixed navbar/hero by ensuring normal flow (no absolute positioning) */
.services-grid, .service-card { position: relative; }

@media (max-width: 1000px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
    .service-card { padding: 18px; }
}

/* FOOTER */
.footer-section { padding: 60px 20px; display: flex; flex-direction: column; align-items: center; min-height: 72vh; justify-content: center; }
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; width: 100%; max-width: 720px; margin-top: 24px; }
.social-card {
    position: relative; background: rgba(30, 41, 59, 0.4); border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px; padding: 30px 20px; text-decoration: none; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.glow-bg {
    position: absolute; top: 50%; left: 50%; width: 150%; height: 150%;
    transform: translate(-50%, -50%) scale(0.5);
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    opacity: 0; transition: all 0.5s ease; z-index: 0; filter: blur(40px);
}
.icon-box { margin-bottom: 15px; z-index: 1; transition: transform 0.4s ease; }
.social-icon { width: 40px; height: 40px; color: #94a3b8; transition: color 0.4s ease; }
.text-content { z-index: 1; }
.text-content h3 { font-family: var(--font-heading); font-size: 1.2rem; color: #fff; margin-bottom: 4px; }
.text-content span { font-size: 0.85rem; color: #64748b; font-weight: 500; transition: color 0.3s ease; }

.social-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.2); }
.social-card:hover .glow-bg { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
.social-card:hover .icon-box { transform: scale(1.1); }

@media (max-width: 800px) {
    .footer-section { min-height: auto; padding: 40px 16px; }
}
.social-card:hover .text-content span { color: #cbd5e1; }
.whatsapp:hover .social-icon { color: #34d399; }
.whatsapp:hover .glow-bg { background: radial-gradient(circle, rgba(52, 211, 153, 0.4) 0%, transparent 70%); }
.whatsapp:hover { border-color: rgba(52, 211, 153, 0.3); }
.linkedin:hover .social-icon { color: #38bdf8; }
.linkedin:hover .glow-bg { background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, transparent 70%); }
.linkedin:hover { border-color: rgba(56, 189, 248, 0.3); }
.instagram:hover .social-icon { color: #f472b6; }
.instagram:hover .glow-bg { background: radial-gradient(circle, rgba(244, 114, 182, 0.4) 0%, transparent 70%); }
.instagram:hover { border-color: rgba(244, 114, 182, 0.3); }
.email:hover .social-icon { color: #facc15; }
.email:hover .glow-bg { background: radial-gradient(circle, rgba(250, 204, 21, 0.3) 0%, transparent 70%); }
.email:hover { border-color: rgba(250, 204, 21, 0.3); }
.copyright { margin-top: 60px; color: #475569; font-size: 0.8rem; }

/* AMBIENT TECH ICONS */
.tech-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: hidden; perspective: 1000px; }
.tech-icon { position: absolute; color: #fff; opacity: 0; transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
.tech-icon.animate-float { animation-name: floatOnce; animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1); animation-duration: 20s; animation-fill-mode: forwards; }
.icon-small { width: 25px; height: 25px; filter: blur(3px); --max-opacity: 0.04; z-index: -3; }
.icon-medium { width: 50px; height: 50px; filter: blur(1px); --max-opacity: 0.08; z-index: -2; }
.icon-large { width: 80px; height: 80px; filter: blur(0px); --max-opacity: 0.12; z-index: -1; }
@keyframes floatOnce {
    0% { opacity: 0; transform: translate3d(0, 0, 0) scale(0.8) rotate(-10deg); }
    20% { opacity: var(--max-opacity); }
    80% { opacity: var(--max-opacity); }
    100% { opacity: 0; transform: translate3d(var(--tx), var(--ty), 0) scale(1.1) rotate(10deg); }
}

/* CURSOR GLOW */
.cursor-glow {
    position: fixed; top: 0; left: 0; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.15) 0%, rgba(255,255,255,0) 60%);
    border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); z-index: -1; filter: blur(50px); transition: opacity 0.3s ease;
}

/* WARP OVERLAY (BLACK HOLE) */
.warp-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 9999;
    pointer-events: none; opacity: 0; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: opacity 0.1s ease;
}
.warp-overlay.engaging { pointer-events: auto; opacity: 1; }
.warp-star {
    position: absolute; width: 200px; height: 3px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    border-radius: 50%; transform: rotate(var(--angle)) translateX(0) scale(0); opacity: 0;
}
.warp-overlay.engaging .warp-star { animation: hyperJump var(--duration) ease-in forwards; animation-delay: var(--delay); }
@keyframes hyperJump {
    0% { opacity: 0; transform: rotate(var(--angle)) translateX(0) scaleX(0.1); }
    40% { opacity: 1; transform: rotate(var(--angle)) translateX(100px) scaleX(1); }
    100% { opacity: 0.8; transform: rotate(var(--angle)) translateX(800px) scaleX(10); }
}
.hyperspace-flash {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #000000; opacity: 0; transform: scale(0); border-radius: 50%; z-index: 10;
}
.warp-overlay.engaging .hyperspace-flash { animation: blackHole 0.6s ease-out forwards 0.8s; }
@keyframes blackHole { 0% { opacity: 0; transform: scale(0); } 100% { opacity: 1; transform: scale(3); } }

/* 404 & ADMIN STYLES */
.error-container, .auth-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; }
.glass-box {
    background: rgba(30, 41, 59, 0.4); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px; padding: 60px 40px; max-width: 600px; backdrop-filter: blur(10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.error-code { font-family: var(--font-heading); font-size: 8rem; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, 0.8); margin-bottom: 20px; animation: floatError 6s ease-in-out infinite; }
@keyframes floatError { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(2deg); } }
.error-msg { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 15px; }
.error-desc { color: #94a3b8; margin-bottom: 40px; line-height: 1.6; }
.btn-home { display: inline-block; background: var(--accent-green); color: var(--bg-dark); text-decoration: none; font-weight: 700; padding: 15px 30px; border-radius: 50px; transition: all 0.3s ease; }
.btn-home:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(52, 211, 153, 0.4); background: #fff; }

/* AUTH & DASHBOARD */
.auth-box { width: 100%; max-width: 400px; padding: 40px; text-align: left; }
.auth-title { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 5px; }
.auth-subtitle { color: #94a3b8; margin-bottom: 30px; }
.input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 0.85rem; color: #cbd5e1; margin-bottom: 8px; font-weight: 500; }
.input-group input { width: 100%; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); padding: 12px 16px; border-radius: 12px; color: #fff; font-family: var(--font-body); transition: all 0.3s ease; }
.input-group input:focus { outline: none; border-color: var(--accent-green); background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 15px rgba(52, 211, 153, 0.2); }
.btn-full { width: 100%; margin-top: 10px; }
.auth-footer { margin-top: 20px; text-align: center; } .auth-footer a { color: #64748b; text-decoration: none; font-size: 0.9rem; transition: 0.3s; } .auth-footer a:hover { color: var(--accent-green); }
.alert { padding: 10px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 20px; background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }

/* DASHBOARD */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; height: 100vh; overflow: hidden; position: relative; }
.glass-panel { background: rgba(30, 41, 59, 0.4); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; }
.sidebar { display: flex; flex-direction: column; margin: 0; padding: 20px; border-radius: 20px; }
.sidebar { position: fixed; left: 15px; top: 15px; bottom: 15px; width: 260px; z-index: 60; overflow-y: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(180deg, rgba(15,23,42,0.95), rgba(15,23,42,0.88)); box-shadow: 0 10px 30px rgba(2,6,23,0.6); }
.sidebar-header h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 30px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 12px; color: #94a3b8; text-decoration: none; font-weight: 500; transition: all 0.2s ease; }
.nav-item:hover, .nav-item.active { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-item.active { border-left: 3px solid var(--accent-green); }
.badge-count { background: var(--accent-green); color: #000; font-size: 0.7rem; font-weight: 700; padding: 2px 6px; border-radius: 10px; margin-left: auto; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 20px; }
.user-name { display: block; font-weight: 600; color: #fff; } .user-role { font-size: 0.8rem; color: #64748b; }
.btn-logout { display: block; margin-top: 10px; font-size: 0.85rem; color: #f87171; text-decoration: none; }
.main-content { padding: 30px; }

/* Dashboard-specific main panel (keeps sidebar fixed) */
.dashboard-layout .main-content { position: absolute; top: 15px; bottom: 15px; left: 290px; right: 15px; padding: 30px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dashboard-layout .main-content > .alert { margin-top: 0; }
.dashboard-layout .stats-grid { margin-top: 4px; }
.top-bar { margin-bottom: 18px; }
.content-section { margin-bottom: 36px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.date-display { color: #94a3b8; font-family: monospace; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card { padding: 20px; display: flex; align-items: center; gap: 20px; transition: transform 0.3s; }
.stat-card:hover { transform: translateY(-5px); background: rgba(30, 41, 59, 0.6); }
.stat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.emerald { background: rgba(52, 211, 153, 0.2); color: #34d399; } .purple { background: rgba(192, 132, 252, 0.2); color: #c084fc; } .blue { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.stat-num { font-size: 2rem; font-weight: 700; line-height: 1.2; } .stat-change { font-size: 0.85rem; color: #94a3b8; } .stat-change.up { color: var(--accent-green); }
.table-container { padding: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 15px; color: #94a3b8; font-size: 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
td { padding: 15px; color: #cbd5e1; border-bottom: 1px solid rgba(255,255,255,0.05); }
tr:last-child td { border-bottom: none; } tr:hover td { background: rgba(255,255,255,0.02); }
.status-pill { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.status-pill.new { background: rgba(52, 211, 153, 0.2); color: #34d399; } .status-pill.read { background: rgba(148, 163, 184, 0.2); color: #94a3b8; } .status-pill.replied { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.btn-sm { background: transparent; border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 4px 12px; border-radius: 6px; cursor: pointer; transition: 0.2s; }
.btn-sm:hover { background: #fff; color: #000; }

/* HARDWARE ACCELERATION */
.tech-icon, .warp-star, .social-card, .career-card, .btn-primary { will-change: transform, opacity; transform: translateZ(0); -webkit-backface-visibility: hidden; }

/* SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(50px) scale(0.95); transition: all 1s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.active { opacity: 1; transform: translateY(0) scale(1); }

/* MEDIA QUERIES (RESPONSIVE) */
@media (max-width: 900px) {
    .container { padding: 60px 25px; width: 100%; }
    .hero h1 { font-size: 2.8rem; line-height: 1.2; }
    .hero-desc { font-size: 1rem; padding: 0 10px; }
    .about-grid { display: flex; flex-direction: column; gap: 40px; text-align: center; }
    .about-image-wrapper { width: 100%; display: flex; justify-content: center; }
    .arch-photo { width: 100%; max-width: 280px; height: auto; aspect-ratio: 3/4; margin: 0 auto; }
    .about-text h2 { font-size: 2rem; }
    .career-grid { grid-template-columns: 1fr; gap: 20px; }
    .career-card { padding: 25px 20px; }
    .social-grid { grid-template-columns: 1fr; width: 100%; }
    .cursor-glow { display: none; }
    .dashboard-layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
    .sidebar { display: none; }
    .main-content { padding: 20px; }
    .glass-box, .career-card, .social-card, .contact-card { backdrop-filter: none; background: rgba(15, 23, 42, 0.95); }
    body::before { display: none; }
}

/* =========================================
   PREMIUM FORM STYLES (DASHBOARD FIX)
   ========================================= */

/* Container Form */
.form-card {
    padding: 30px;
    margin-bottom: 30px;
    background: rgba(15, 23, 42, 0.6); /* Lebih gelap */
    border: 1px solid rgba(52, 211, 153, 0.2); /* Border hijau tipis */
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3);
}

.form-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 25px;
}
.form-header h3 {
    margin: 0; font-size: 1.2rem; color: var(--accent-green);
}
.icon-plus {
    width: 24px; height: 24px; background: rgba(52, 211, 153, 0.2); 
    color: var(--accent-green); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; font-weight: bold;
}

/* Layout Grid Input */
.form-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 20px; margin-bottom: 20px;
}
.full-width { width: 100%; margin-bottom: 20px; }

/* Label Styling */
.input-wrapper label {
    display: block; font-size: 0.8rem; color: #94a3b8; margin-bottom: 8px; font-weight: 500;
    letter-spacing: 0.5px;
}

/* THE PREMIUM INPUT (Dark Glass) */
.glass-input-premium {
    width: 100%;
    background: rgba(2, 6, 23, 0.5) !important; /* Hitam transparan */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important; /* Teks putih */
    padding: 14px 16px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

/* Placeholder warna abu (biar ga nabrak) */
.glass-input-premium::placeholder { color: #475569; }

/* Saat diklik (Fokus) - GLOWING EFFECT */
.glass-input-premium:focus {
    outline: none;
    border-color: var(--accent-green);
    background: rgba(2, 6, 23, 0.8) !important;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1); /* Aura Hijau */
}

/* Button Save */
.form-actions { text-align: right; }
.btn-save {
    padding: 12px 30px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(52, 211, 153, 0.3);
}

/* Tombol Delete Kecil di Tabel */
.btn-icon-delete {
    display: inline-flex; align-items: center; justify-content: center;
    width: 35px; height: 35px; border-radius: 8px;
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2);
    text-decoration: none; transition: 0.2s; font-size: 1rem;
}
.btn-icon-delete:hover {
    background: rgba(239, 68, 68, 0.9); border-color: transparent;
    transform: scale(1.1);
}

/* Responsif di HP */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-card { padding: 20px; }
}

/* =========================================
   PREMIUM INBOX STYLES (DASHBOARD)
   ========================================= */

/* Container Tabel Premium */
.table-card {
    overflow: hidden; /* Biar border radius tabel ga bocor */
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.6);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-body);
}

/* Header Tabel */
.premium-table thead th {
    background: rgba(255, 255, 255, 0.03);
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 18px 24px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Baris Tabel (Row) */
.premium-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.premium-table tbody tr:last-child { border-bottom: none; }

/* Hover Effect: Highlight Hijau Tipis */
.premium-table tbody tr:hover {
    background: rgba(52, 211, 153, 0.05);
}

/* Sel Tabel */
.premium-table td {
    padding: 20px 24px; /* Padding lega atas-bawah kiri-kanan */
    vertical-align: middle;
    color: #cbd5e1;
}

/* --- KOMPONEN AVATAR & SENDER --- */
.sender-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-circle {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent-green), #059669);
    border-radius: 50%;
    color: #000;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(52, 211, 153, 0.3);
}

.sender-text {
    display: flex; flex-direction: column;
}

.sender-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.sender-email {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 2px;
}

/* --- MESSAGE CONTENT --- */
.message-cell {
    max-width: 400px; /* Batasi lebar biar ga melebar banget */
}
.message-preview {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e2e8f0;
    /* Limit 2 baris teks, sisanya titik-titik (...) */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- DATE & BADGES --- */
.date-badge {
    font-family: monospace;
    font-size: 0.8rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-radius: 8px;
}

.badge-count-lg {
    background: var(--accent-green);
    color: #020617;
    font-weight: bold;
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Empty State (Kalau inbox kosong) */
.empty-state {
    text-align: center;
    padding: 50px !important;
    color: #64748b;
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* Responsif HP */
@media (max-width: 768px) {
    .premium-table thead { display: none; /* Sembunyikan header di HP */ }
    .premium-table td { display: block; padding: 10px 20px; text-align: left !important; }
    .sender-info { margin-bottom: 10px; }
    .message-cell { max-width: 100%; margin-bottom: 10px; }
    .date-badge { display: inline-block; margin-top: 5px; }
    .premium-table tbody tr { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
}

/* =========================================
   HORIZONTAL MARQUEE - Tech Stack Animation
   ========================================= */
.tech-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 16px 0;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
    mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
}

.tech-marquee {
    display: flex;
    width: fit-content;
    animation: marquee-scroll 30s linear infinite;
    will-change: transform;
}

.tech-marquee:hover {
    animation-play-state: paused;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent-green);
    padding-right: 3rem;
    text-transform: uppercase;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .marquee-content {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
}

/* =========================================
   ENHANCED SPACING & TYPOGRAPHY
   ========================================= */
.container {
    padding-top: 80px;
    padding-bottom: 80px;
}

.section-header h2 {
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero {
    min-height: 100vh;
    padding-top: 120px;
    padding-bottom: 60px;
}

.hero-content h1 {
    line-height: 1.3;
    margin-bottom: 16px;
}

.hero-desc {
    line-height: 1.8;
    margin-top: 24px;
}

/* Better card spacing */
.service-card,
.project-card,
.glass-panel {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.4s ease;
}

.service-card:hover,
.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(52, 211, 153, 0.2);
}

/* Smooth transitions for all interactive elements */
a, button, .nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .tech-marquee {
        animation: none;
    }
    
    .aurora-light {
        animation: none;
    }
}