/* ===========================
   VARIABLES & BASE
   =========================== */
:root {
    --bg-dark: #030712;
    --bg-card: #0a0f1e;
    --accent: #10b981;
    --accent-cyan: #06b6d4;
    --accent-glow: rgba(16, 185, 129, 0.15);
    --border: rgba(30, 41, 59, 0.8);
    --text-muted: #475569;
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
    background-color: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', monospace; }


/* ===========================
   CUSTOM CURSOR
   =========================== */
@media (pointer: fine) {
    * { cursor: none !important; }

    .cursor-dot {
        position: fixed;
        width: 6px;
        height: 6px;
        background: var(--accent);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: transform 0.1s ease, opacity 0.3s;
    }

    .cursor-ring {
        position: fixed;
        width: 32px;
        height: 32px;
        border: 1px solid rgba(16, 185, 129, 0.4);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9998;
        transform: translate(-50%, -50%);
        transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease, opacity 0.3s;
    }

    body:has(a:hover) .cursor-ring,
    body:has(button:hover) .cursor-ring {
        width: 48px;
        height: 48px;
        border-color: rgba(16, 185, 129, 0.6);
    }
}

/* ===========================
   SCROLLBAR
   =========================== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }


/* ===========================
   NAVIGATION
   =========================== */
.nav-scrolled {
    background: rgba(3, 7, 18, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.nav-link {
    position: relative;
    color: #64748b;
    transition: color 0.2s;
    padding-bottom: 2px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.social-icon {
    color: #64748b;
    font-size: 1.1rem;
    transition: color 0.2s, transform 0.2s;
}

.social-icon:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.mobile-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: #64748b;
    text-transform: uppercase;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: block;
    transition: color 0.2s, padding-left 0.2s;
}

.mobile-link:hover { color: var(--accent); padding-left: 6px; }
.mobile-link:last-of-type { border-bottom: none; }


/* ===========================
   HERO
   =========================== */
.grid-bg {
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
}

.hero-glow {
    background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    animation: pulse-glow 5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
}

.orbit-ring {
    width: 500px;
    height: 500px;
    border: 1px solid rgba(16, 185, 129, 0.06);
    border-radius: 50%;
    animation: orbit-spin 30s linear infinite;
}

.orbit-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.6;
    box-shadow: 0 0 8px var(--accent);
}

.orbit-ring::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 25%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-cyan);
    opacity: 0.4;
    box-shadow: 0 0 6px var(--accent-cyan);
}

@keyframes orbit-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.status-badge {
    animation: badge-float 3s ease-in-out infinite;
}

@keyframes badge-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.hero-title {
    text-shadow: 0 0 60px rgba(16, 185, 129, 0.1);
}

.typing-cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    background: var(--accent);
    color: #030712;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.2);
    text-decoration: none;
}

.btn-primary:hover {
    background: #34d399;
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.35);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--accent);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    100% { opacity: 0; transform: scaleY(1); transform-origin: bottom; }
}

/* Glitch Logo */
.glitch-logo {
    position: relative;
}

.glitch-logo:hover::before,
.glitch-logo:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0;
    color: var(--accent);
    font-weight: bold;
}

.glitch-logo:hover::before {
    animation: glitch-1 0.3s steps(1) infinite;
    clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
    text-shadow: -2px 0 #f43f5e;
    color: #f43f5e;
}

.glitch-logo:hover::after {
    animation: glitch-2 0.3s steps(1) infinite;
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    text-shadow: 2px 0 #06b6d4;
    color: #06b6d4;
}

@keyframes glitch-1 {
    0%, 100% { transform: translateX(0); }
    33% { transform: translateX(-3px); }
    66% { transform: translateX(3px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translateX(0); }
    33% { transform: translateX(3px); }
    66% { transform: translateX(-3px); }
}


/* ===========================
   SECTION LABELS
   =========================== */
.section-label {
    display: flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 1rem;
}


/* ===========================
   GLASS / TERMINAL
   =========================== */
.glass {
    background: rgba(10, 15, 30, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.terminal-window {
    position: relative;
}

.terminal-window::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03), transparent 50%);
    pointer-events: none;
}

/* Counter animation */
.counter { transition: all 0.3s; }


/* ===========================
   SKILLS
   =========================== */
.skill-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid #1e293b;
    padding: 1.4rem 1rem;
    border-radius: 14px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.skill-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.1), 0 0 0 1px rgba(16, 185, 129, 0.1);
    background: rgba(10, 15, 30, 0.8);
}

.skill-card:hover::before { transform: scaleX(1); }

.skill-icon {
    font-size: 1.5rem;
    color: #334155;
    transition: color 0.3s, transform 0.3s;
}

.skill-card:hover .skill-icon {
    color: var(--accent);
    transform: scale(1.15);
}


/* ===========================
   CERTIFICATIONS
   =========================== */
.cert-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.badge-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    border: 1px solid;
    padding: 2px 8px;
    border-radius: 4px;
}

.cert-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.cert-item-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: #64748b;
    border: 1px solid transparent;
    text-decoration: none;
}

.cert-item-link:hover {
    background: rgba(16, 185, 129, 0.04);
    border-color: rgba(16, 185, 129, 0.12);
    color: #e2e8f0;
    padding-left: 1.4rem;
}

.cert-item-link:hover .cert-icon {
    border-color: var(--accent);
    transform: scale(1.12);
}

/* Smooth accordion with max-height */
.cert-content {
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(10, 15, 30, 0.3);
    border-left: 1px solid rgba(30, 41, 59, 0.5);
    border-right: 1px solid rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    border-radius: 0 0 16px 16px;
    margin-top: -2px;
}

.arrow { transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.rotate-180 { transform: rotate(180deg) !important; }

@media (max-width: 640px) {
    .cert-item-link { font-size: 0.65rem; }
    .cert-item-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
}


/* ===========================
   PROJECTS
   =========================== */
.project-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: rgba(10, 15, 30, 0.5);
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.project-card-glow {
    position: absolute;
    inset: 0;
    transition: opacity 0.4s;
}

.project-header { padding: 1.5rem 1.5rem 0; }
.project-body { padding: 1rem 1.5rem 1.5rem; }

.scanline-container {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 0;
}

.scanline-bg {
    position: absolute;
    inset: 0;
    background: rgba(16, 185, 129, 0.03);
    border-radius: 14px;
}

.scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
}

.tech-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #475569;
}

.coming-soon-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    font-style: italic;
    border: 1px solid;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}


/* ===========================
   PROJECT FILTER BUTTONS
   =========================== */
.filter-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #1e293b;
    color: #475569;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
}

.filter-btn:hover {
    border-color: rgba(16,185,129,0.3);
    color: var(--accent);
}

.filter-btn.active {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.4);
    color: var(--accent);
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(16,185,129,0.15);
    font-size: 9px;
    margin-left: 4px;
}

/* ===========================
   PROJECT CARDS (NEW)
   =========================== */
.proj-card {
    position: relative;
    border: 1px solid rgba(30,41,59,0.8);
    border-radius: 18px;
    background: rgba(10,15,30,0.6);
    overflow: hidden;
    transition: all 0.3s ease;
}

.proj-card:hover {
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.proj-card.hidden-proj {
    display: none;
}

.proj-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-c);
    opacity: 0;
    transition: opacity 0.3s;
}

.proj-card:hover .proj-accent { opacity: 1; }

.proj-inner {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.proj-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.1rem;
}

.proj-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.proj-gh-link {
    color: #334155;
    font-size: 1rem;
    transition: color 0.2s, transform 0.2s;
}

.proj-gh-link:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.proj-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #475569;
    letter-spacing: 0.05em;
}

.coming-badge {
    color: #10b981 !important;
    border-color: rgba(16,185,129,0.3) !important;
    background: rgba(16,185,129,0.06) !important;
}

.proj-title {
    font-size: 1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 2px;
    transition: color 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.proj-card:hover .proj-title {
    color: white;
}

.proj-subtitle {
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    color: #475569;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.proj-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.proj-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--t) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--t) 20%, transparent);
    color: color-mix(in srgb, var(--t) 70%, #94a3b8);
}

/* ===========================
   CONTACT
   =========================== */
.contact-social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #475569;
    border: 1px solid #1e293b;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.contact-social-btn:hover {
    color: var(--accent);
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
    transform: translateY(-2px);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-gradient-shift {
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
}


/* ===========================
   MATRIX CANVAS (handled in JS)
   =========================== */
#matrix-canvas { mix-blend-mode: screen; }
