﻿body {
    overflow-x: hidden;
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1), color 0.5s ease;
}

.stars-bg {
    background-image:
        radial-gradient(2px 2px at 20px 30px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 130px 80px, #ffffff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 160px 120px, #ffffff, rgba(0, 0, 0, 0));
    background-size: 200px 200px;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.dark .stars-bg {
    opacity: 0.15;
}

.text-animate-gradient {
    background: linear-gradient(to right, #0ea5e9, #6366f1, #0ea5e9);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    animation: gradientMove 4s linear infinite;
}

.dark .text-animate-gradient {
    background: linear-gradient(to right, #38BDF8, #818CF8, #38BDF8);
    background-size: 200% auto;
    -webkit-background-clip: text;
}

@keyframes gradientMove {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* =============================================
   GITHUB CONTRIBUTION GRAPH
   ============================================= */
.gh-graph-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gh-graph-wrapper img {
    min-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    /* Default: light mode – graph renders with its native colours */
    filter: none;
    transition: filter 0.5s ease;
}

/* Dark mode: invert colours so the dark-green squares pop on #070B14 */
.dark .gh-graph-wrapper img {
    filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(1.05);
}

.gh-graph-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* =============================================
   HIDDEN TERMINAL / HACKER MODE
   ============================================= */
#hacker-terminal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.97);
    display: flex;
    flex-direction: column;
    font-family: 'Courier New', 'Lucida Console', monospace;
    color: #00ff00;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

#hacker-terminal.active {
    opacity: 1;
    pointer-events: all;
}

.terminal-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #111;
    border-bottom: 1px solid #00ff0030;
    flex-shrink: 0;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-topbar span {
    font-size: 12px;
    color: #00ff0099;
    margin-left: auto;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    line-height: 1.75;
    font-size: clamp(12px, 1.5vw, 14px);
    scrollbar-width: thin;
    scrollbar-color: #00ff0040 transparent;
}

#terminal-output::-webkit-scrollbar {
    width: 4px;
}

#terminal-output::-webkit-scrollbar-thumb {
    background: #00ff0040;
    border-radius: 4px;
}

.t-line {
    color: #00ff00;
    white-space: pre-wrap;
    word-break: break-word;
}

.t-cmd {
    color: #ffffff;
}

.t-dim {
    color: #00ff0055;
}

.t-warn {
    color: #ffcc00;
}

.t-error {
    color: #ff4444;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    padding: 12px 24px 20px;
    border-top: 1px solid #00ff0030;
    flex-shrink: 0;
    gap: 8px;
    background: #000;
}

.terminal-prompt {
    color: #00ff00;
    font-size: 14px;
    white-space: nowrap;
    user-select: none;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #00ff00;
    font-family: inherit;
    font-size: 14px;
    caret-color: #00ff00;
}

.t-blink-cursor {
    display: inline-block;
    width: 9px;
    height: 15px;
    background: #00ff00;
    margin-left: 2px;
    vertical-align: middle;
    animation: blink-block 1s step-start infinite;
}

@keyframes blink-block {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.tilde-hint {
    position: fixed;
    bottom: 20px;
    right: 24px;
    z-index: 400;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #00ff0066;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #00ff0020;
    padding: 4px 10px;
    border-radius: 6px;
    pointer-events: none;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    transition: opacity 0.5s ease;
}

/* ── Custom Cursor ─────────────────────────────────────────── */
body {
    cursor: none;
}

/* Keep native cursor inside the terminal input so typing stays comfortable */
#terminal-input {
    cursor: text;
}

#cursor-dot,
#cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
}

#cursor-dot {
    width: 8px;
    height: 8px;
    background: #6366f1;
    /* indigo-500 */
    box-shadow: 0 0 10px 3px rgba(99, 102, 241, .7),
        0 0 20px 6px rgba(99, 102, 241, .35);
    transform: translate(-50%, -50%);
    transition: opacity .2s ease, transform .15s ease;
}

#cursor-ring {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(99, 102, 241, .55);
    background: transparent;
    transform: translate(-50%, -50%) scale(1);
    transition: width .25s ease, height .25s ease,
        border-width .25s ease, border-color .25s ease,
        transform .25s cubic-bezier(.22, 1, .36, 1);
}

/* Hover state: ring grows, border thins, dot pulses */
body.cursor-hover #cursor-ring {
    width: 54px;
    height: 54px;
    border-width: 1px;
    border-color: rgba(99, 102, 241, .9);
    background: rgba(99, 102, 241, .06);
}

body.cursor-hover #cursor-dot {
    transform: translate(-50%, -50%) scale(1.5);
}

/* Hide cursors on touch devices — they don't need it */
@media (hover: none) {

    #cursor-dot,
    #cursor-ring {
        display: none;
    }

    body {
        cursor: auto;
    }
}
