/* ===== CSS Variables ===== */
:root {
    --bg: #0a0a0f;
    --terminal-bg: #0f0f18;
    --terminal-header: #151520;
    --purple: #a855f7;
    --pink: #ec4899;
    --cyan: #22d3ee;
    --green: #4ade80;
    --yellow: #facc15;
    --text: #e2e8f0;
    --muted: #64748b;
    --glow-purple: rgba(168, 85, 247, 0.4);
    --glow-pink: rgba(236, 72, 153, 0.4);
    --glow-cyan: rgba(34, 211, 238, 0.4);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Background Effects ===== */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 40%, rgba(34, 211, 238, 0.08) 0%, transparent 40%);
    animation: gradientPulse 10s ease-in-out infinite alternate;
}

@keyframes gradientPulse {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.8; transform: scale(1.1); }
}

.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(168, 85, 247, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.05) 0px,
        rgba(0, 0, 0, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
}

/* ===== Layout ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== Terminal Windows ===== */
.terminal {
    background: var(--terminal-bg);
    border-radius: 16px;
    margin: 2rem 0;
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 
        0 0 0 1px rgba(168, 85, 247, 0.1),
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(168, 85, 247, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: terminalIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(40px);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.terminal:nth-child(2) { animation-delay: 0.15s; }
.terminal:nth-child(3) { animation-delay: 0.3s; }
.terminal:nth-child(4) { animation-delay: 0.45s; }
.terminal:nth-child(5) { animation-delay: 0.6s; }
.terminal:nth-child(6) { animation-delay: 0.75s; }

.terminal:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 
        0 0 0 1px rgba(168, 85, 247, 0.2),
        0 25px 80px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(168, 85, 247, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

@keyframes terminalIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Terminal Header ===== */
.terminal-header {
    background: var(--terminal-header);
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.terminal-dot.red { 
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.terminal-dot.yellow { 
    background: linear-gradient(135deg, #ffd93d, #f0c829);
    box-shadow: 0 0 10px rgba(255, 217, 61, 0.3);
}

.terminal-dot.green { 
    background: linear-gradient(135deg, #6bcb77, #5ab868);
    box-shadow: 0 0 10px rgba(107, 203, 119, 0.3);
}

.terminal-title {
    margin-left: 1rem;
    font-size: 0.75rem;
    color: var(--muted);
}

/* ===== Terminal Body ===== */
.terminal-body {
    padding: 1.75rem;
    font-size: 0.9rem;
    line-height: 1.9;
}

.hero-content {
    margin-top: 2rem;
}

.terminal-input {
    margin-top: 2rem;
}

/* ===== Text Styling ===== */
.prompt {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.command {
    color: var(--cyan);
    text-shadow: 0 0 20px var(--glow-cyan);
    opacity: 0;
}

.output {
    color: var(--text);
    margin: 0.75rem 0 1.75rem 0;
}

/* ===== Cursor ===== */
@media (pointer: fine) {
    *, *::before, *::after {
        cursor: none !important;
    }

    html, body {
        cursor: none !important;
    }

    a, button, input, textarea, select, [onclick] {
        cursor: none !important;
    }

    .custom-cursor {
        position: fixed;
        width: 20px;
        height: 20px;
        border: 2px solid var(--cyan);
        border-radius: 50%;
        pointer-events: none;
        z-index: 999999;
        transition: transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        box-shadow: 0 0 15px var(--glow-cyan);
        mix-blend-mode: difference;
    }

    .custom-cursor.clicking {
        transform: scale(0.8);
        border-color: var(--pink);
        box-shadow: 0 0 20px var(--glow-pink);
    }

    .custom-cursor-dot {
        position: fixed;
        width: 6px;
        height: 6px;
        background: var(--pink);
        border-radius: 50%;
        pointer-events: none;
        z-index: 999999;
        box-shadow: 0 0 10px var(--glow-pink);
    }
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 1.2em;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    box-shadow: 0 0 15px var(--glow-purple);
}

@keyframes blink {
    0%, 100% { visibility: visible; }
    50% { visibility: hidden; }
}

/* ===== ASCII Art ===== */
.ascii-art {
    font-size: clamp(0.55rem, 1.8vw, 1rem);
    line-height: 1.2;
    white-space: pre;
    background: linear-gradient(135deg, var(--cyan), var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px var(--glow-purple));
    animation: asciiGlow 3s ease-in-out infinite alternate;
}

@keyframes asciiGlow {
    0% { filter: drop-shadow(0 0 20px var(--glow-purple)); }
    50% { filter: drop-shadow(0 0 30px var(--glow-cyan)); }
    100% { filter: drop-shadow(0 0 20px var(--glow-pink)); }
}

/* ===== Project Items ===== */
.project-item {
    padding: 1.25rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-item:last-child {
    border-bottom: none;
}

.project-item:hover {
    padding-left: 1.5rem;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
}

.project-name {
    color: var(--yellow);
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
}

.project-name::before {
    content: '→ ';
    background: linear-gradient(135deg, var(--purple), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-name a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s;
}

.project-name a:hover {
    opacity: 0.7;
}

.project-desc {
    color: var(--muted);
    margin: 0.5rem 0;
    padding-left: 1.25rem;
    font-size: 0.85rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    padding-left: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.tech-tag {
    font-size: 0.65rem;
    color: var(--cyan);
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 4px;
    background: rgba(34, 211, 238, 0.05);
    transition: all 0.3s;
}

.tech-tag:hover {
    background: rgba(34, 211, 238, 0.15);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

/* ===== Skill Groups ===== */
.skill-group {
    margin-bottom: 1.5rem;
}

.skill-group:last-child {
    margin-bottom: 0;
}

.skill-label {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--purple);
    margin-bottom: 0.75rem;
    text-transform: lowercase;
}

.skill-label::before {
    content: '// ';
    color: var(--muted);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===== Contact Links ===== */
.link-grid {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.link-btn {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.05);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.85rem;
}

.link-btn:hover {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(168, 85, 247, 0.3);
}

.link-btn span {
    margin-right: 0.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .ascii-art {
        font-size: 0.3rem;
    }

    .skill-name {
        width: 80px;
        font-size: 0.7rem;
    }

    .link-grid {
        flex-direction: column;
    }

    .link-btn {
        text-align: center;
    }

    .terminal-body {
        padding: 1.25rem;
    }
}

/* .command {
    visibility: hidden;
} */

/* === Experience === */

.exp-item {
    padding: 1.25rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.exp-item:last-child {
    border-bottom: none;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.exp-role {
    color: var(--yellow);
    font-weight: 700;
}

.exp-date {
    font-size: 0.75rem;
    color: var(--muted);
    font-style: italic;
}

.exp-company {
    color: var(--cyan);
    font-size: 0.85rem;
    margin: 0.25rem 0 0.5rem 0;
}

.exp-desc {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* === neofetch === */

.neofetch-container {
    display: flex;
    gap: 2rem;
    margin: 1rem 0 2rem 0;
    align-items: flex-start;
}

.neofetch-info {
    padding-top: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.8;
}

.neofetch-line {
    white-space: nowrap;
}

.nf-label {
    color: var(--cyan);
    font-weight: 700;
}

.nf-at {
    color: var(--muted);
}

.nf-host {
    color: var(--purple);
    font-weight: 700;
}

.neofetch-dividier {
    color: var(--muted);
    margin: 0.25rem 0;
}

.nf-key {
    color: var(--pink);
    font-weight: 700;
}

.nf-key::after {
    content: ' ';
}

.nf-status {
    color: var(--green);
}

.neofetch-color {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.nf-color {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 3px;
}

.nf-color.c1 { background: #ff6b6b; }
.nf-color.c2 { background: #ffd93d; }
.nf-color.c3 { background: #6bcb77; }
.nf-color.c4 { background: var(--cyan); }
.nf-color.c5 { background: var(--purple); }
.nf-color.c6 { background: var(--pink); }

@media (max-width: 768px) {
    .neofetch-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* === Easter Egg === */

.rainbow-mode {
    animation: rainbowBg 2s linear infinite;
}

@keyframes rainbowBg {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.easter-egg-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.egg-content {
    text-align: center;
    color: var(--text);
}

.egg-ascii {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.5rem;
    line-height: 1.1;
    color: var(--cyan);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px var(--glow-cyan);
    text-align: left;
    display: inline-block;
}

.egg-content p {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.egg-subtext {
    font-size: 1rem !important;
    color: var(--muted);
}

.egg-content button {
    margin-top: 2rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: none;
    border-radius: 8px;
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.egg-content button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--glow-purple);
}

/* === Status === */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 100px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.5);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.status-text {
    font-size: 0.8rem;
    color: var(--green);
}

/* === Custom cursor, welcome back Web2 === */
@media (pointer: fine) {
    * {
        cursor: none imo !important;
    }

    .custom-cursor {
        position: fixed;
        width: 20px;
        height: 20px;
        border: 2px solid var(--cyan);
        border-radius: 50%;
        pointer-events: none;
        z-index: 999999;
        transition: transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
        box-shadow: 0 0 15px var(--glow-cyan);
    }

    .custom-cursor.clicking {
        transform: scale(0.8);
        border-color: var(--pink);
        box-shadow: 0 0 20px var(--glow-pink);
    }

    .custom-cursor-dot {
        position: fixed;
        width: 6px;
        height: 6px;
        background: var(--pink);
        border-radius: 50%;
        pointer-events: none;
        z-index: 999999;
        box-shadow: 0 0 10px var(--glow-pink);
    }
}

/* === Theme Switcher === */
.theme-switcher {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.command-static {
    color: var(--cyan);
    text-shadow: 0 0 20px var(--glow-cyan);
}

.theme-options {
    display: flex;
    gap: 0.5rem;
}

.theme-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    outline: none;
}

.theme-btn:hover {
    transform: scale(1.2);
}

.theme-btn:active {
    border-color: var(--text);
    box-shadow: 0 0 15px currentColor;
}

.theme-btn[data-theme="purple"] { 
    background: linear-gradient(135deg, #a855f7, #ec4899) !important; 
}

.theme-btn[data-theme="green"] { 
    background: linear-gradient(135deg, #22c55e, #10b981) !important; 
}

.theme-btn[data-theme="blue"] { 
    background: linear-gradient(135deg, #3b82f6, #22d3ee) !important; 
}

.theme-btn[data-theme="orange"] { 
    background: linear-gradient(135deg, #f97316, #eab308) !important; 
}

/* Vaiables */
[data-theme="green"] {
    --purple: #22c55e;
    --pink: #10b981;
    --cyan: #4ade80;
    --glow-purple: rgba(34, 197, 94, 0.4);
    --glow-pink: rgba(16, 185, 129, 0.4);
    --glow-cyan: rgba(74, 222, 128, 0.4);    
}
[data-theme="blue"] {
    --purple: #3b82f6;
    --pink: #22d3ee;
    --cyan: #60a5fa;
    --glow-purple: rgba(59, 130, 246, 0.4);
    --glow-pink: rgba(34, 211, 238, 0.4);
    --glow-cyan: rgba(96, 165, 250, 0.4);
}
[data-theme="orange"] {
    --purple: #f97316;
    --pink: #eab308;
    --cyan: #fb923c;
    --glow-purple: rgba(249, 115, 22, 0.4);
    --glow-pink: rgba(234, 179, 8, 0.4);
    --glow-cyan: rgba(251, 146, 60, 0.4);
}

/* === Matrix === */
.matrix-toggle {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 1rem;
}

.matrix-toggle:hover {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.matrix-toggle.active {
    background: #22c55e;
    color: #0a0a0f;
}

#matrixCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s;
}

#matrixCanvas.active {
    opacity: 0.15;
}

/* === Mobile support === */
@media (min-width: 769px) {
    .mobile-nav {
        display: none;
    }
}

.mobile-nav {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.nav-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 30px var(--glow-purple);
    transition: all 0.3s;
}

.nav-toggle:hover {
    transform: scale(1.1);
}

.nav-menu {
    position: absolute;
    bottom: 60x;
    right: 0;
    background: var(--terminal-bg);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.nav-menu a:hover {
    background: rgba(168, 85, 247, 0.2);
    color: var(--cyan);
}