/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-gray-light: #F5F5F5;
    --color-gray: #E0E0E0;
    --color-gray-medium: #9E9E9E;
    --color-gray-dark: #616161;
    --color-gray-darker: #424242;
    --cyber-green: #00ff41;
    --cyber-blue: #00d4ff;
    --cyber-red: #ff0040;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    --glow-green: 0 0 20px rgba(0, 255, 65, 0.5);
    --glow-blue: 0 0 20px rgba(0, 212, 255, 0.5);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: var(--color-white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   BACKGROUND
   ============================================ */
.cyber-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
}

#cyberCanvas {
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

/* ============================================
   PROFILE CONTAINER
   ============================================ */
.profile-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   MAIN CARD
   ============================================ */
.main-card {
    width: 100%;
    max-width: 500px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease-out;
}

/* ============================================
   PROFILE HEADER
   ============================================ */
.profile-header {
    text-align: center;
    margin-bottom: 1rem;
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 0.75rem;
    overflow: visible;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 2;
}

.online-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #1a1a1a;
    padding: 0.2rem 0.45rem;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    font-size: 0.6rem;
    z-index: 3;
    white-space: nowrap;
}

.status-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #00ff41;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.status-text {
    font-size: 0.55rem;
    color: #ccc;
    font-weight: 500;
    line-height: 1;
}

.main-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.username {
    font-size: 0.95rem;
    color: #999;
    font-weight: 400;
}

.location-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: #ccc;
}

.location-icon {
    width: 14px;
    height: 14px;
    color: #999;
}

.location-icon {
    width: 18px;
    height: 18px;
    color: var(--color-gray-dark);
}

.tags-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #1a1a1a;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin-top: 0.50rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tags-icon {
    width: 14px;
    height: 14px;
    color: var(--color-white);
    opacity: 0.8;
}

.tag {
    font-size: 0.8rem;
    color: var(--color-white);
    font-weight: 400;
}

.tag-separator {
    color: var(--color-white);
    font-size: 0.8rem;
    opacity: 0.6;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   SKILLS DISPLAY
   ============================================ */
.skills-display {
    width: 100%;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
}

.skills-display.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 2000px;
}

.terminal-wrapper {
    width: 100%;
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.terminal-wrapper .terminal-body {
    padding: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #888;
    background: #0a0a0a;
    height: 45px;
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.4;
}

.terminal-wrapper .terminal-body::-webkit-scrollbar {
    width: 8px;
}

.terminal-wrapper .terminal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.terminal-wrapper .terminal-body::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.terminal-wrapper .terminal-body::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.skills-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item-display {
    width: 100%;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.skill-name-display {
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-percent-display {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
}

.skill-progress-bar-display {
    width: 100%;
    height: 8px;
    background: #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-progress-fill-display {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00d4ff);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* ============================================
   PROJECTS DISPLAY
   ============================================ */
.projects-display {
    width: 100%;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
}

.projects-display.show {
    opacity: 1;
    transform: translateY(0);
    max-height: 2000px;
}

.projects-grid-display {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.project-card-display {
    background: #2a2a2a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card-display:hover {
    background: #333;
    border-color: #444;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
}

.project-card-display h3 {
    color: var(--color-white);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

.project-card-display p {
    color: #ccc;
    line-height: 1.6;
    font-size: 0.85rem;
}

.view-btn {
    padding: 0.6rem 1.5rem;
    background: #333;
    border: 2px solid #444;
    border-radius: 6px;
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.view-btn:hover {
    background: #444;
    border-color: #555;
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.view-btn:active {
    transform: translateY(0);
}

.btn-icon {
    width: 24px;
    height: 24px;
}

/* ============================================
   TERMINAL MODAL
   ============================================ */
.terminal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.terminal-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.terminal-container {
    width: 90%;
    max-width: 900px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem;
    background: #1e1e2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 8px 0 0;
}

.terminal-controls {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.control-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.control-dot.red {
    background: #4a4a4a;
}

.control-dot.yellow {
    background: #5a5a5a;
}

.control-dot.green {
    background: #6a6a6a;
}

.terminal-title {
    color: #b0b0b0;
    font-weight: 400;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.terminal-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.3s ease;
}

.terminal-close:hover {
    color: var(--color-white);
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: #00ff41;
    background: #0a0a0a;
    min-height: 400px;
    max-height: 70vh;
    overflow-y: auto;
    line-height: 1.8;
}

.terminal-line {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-prompt {
    color: #fff;
}

.terminal-command {
    color: #888;
}

.terminal-output {
    color: #888;
    margin-left: 0;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.terminal-cursor {
    animation: blink 1s infinite;
    color: #fff;
}

.terminal-typing {
    display: inline-block;
}

.skill-progress-container {
    margin: 0.3rem 0;
    padding: 0.3rem;
    background: #1a1a1a;
    border-left: 3px solid #fff;
    border-radius: 4px;
    width: 100%;
}

.skill-item-terminal {
    width: 100%;
    margin-bottom: 0.3rem;
    position: relative;
}

.skill-header-terminal {
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
    width: 100%;
}

.skill-name-terminal {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.skill-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.skill-progress-bar-terminal {
    width: 280px;
    max-width: 100%;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.skill-percent-terminal {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

.skill-progress-fill-terminal {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.8s ease;
    position: relative;
}

.skill-item {
    margin-bottom: 1rem;
}

.skill-name {
    color: #00ff41;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.skill-progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.skill-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff41, #00d4ff);
    border-radius: 4px;
    transition: width 1s ease;
    position: relative;
}

.skill-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.skill-percentage {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 1;
}

/* ============================================
   PROJECTS MODAL
   ============================================ */
.projects-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.projects-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.projects-container {
    width: 90%;
    max-width: 1000px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: #2a2a2a;
    border-bottom: 1px solid #333;
}

.projects-header h2 {
    color: var(--color-white);
    font-size: 2rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.5rem;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--color-white);
}

.projects-grid {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    overflow-y: auto;
    flex: 1;
}

.project-card {
    background: #2a2a2a;
    border: 2px solid #333;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    background: #333;
    border-color: #444;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    transform: translateY(-4px);
}

.project-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.project-icon.type-1 {
    background: rgba(255, 0, 64, 0.1);
    border: 2px solid #ff0040;
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.4), 0 0 20px rgba(255, 0, 64, 0.2);
}

.project-icon.type-2 {
    background: rgba(0, 200, 0, 0.1);
    border: 2px solid #00c800;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4), 0 0 20px rgba(0, 255, 65, 0.2);
}

.project-icon.type-3 {
    background: rgba(0, 0, 0, 0.05);
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 20px rgba(255, 255, 255, 0.2);
}

.project-icon.type-4 {
    background: rgba(255, 170, 0, 0.1);
    border: 2px solid #ffaa00;
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.4), 0 0 20px rgba(255, 170, 0, 0.2);
}

.project-icon svg {
    width: 32px;
    height: 32px;
}

.project-icon img {
    width: 20px;
    height: 20px;
}

.project-card h3 {
    color: var(--color-white);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-card p {
    color: #ccc;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============================================
   SOCIAL LINKS
   ============================================ */
.social-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    border: 2px solid #333;
    border-radius: 50%;
    color: var(--color-white);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.social-link:hover {
    background: #333;
    border-color: #444;
    color: var(--color-white);
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* ============================================
   MUSIC PLAYER BUBBLE
   ============================================ */
.music-player-bubble {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 999;
}

.music-loading {
    padding: 1rem 1.5rem;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 30px;
    color: #ccc;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.music-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #444;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.music-toggle:hover {
    background: #444;
    border-color: #555;
    color: var(--color-white);
    transform: scale(1.1);
}

.music-icon {
    width: 28px;
    height: 28px;
}

.music-player {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    display: none;
    animation: slideUp 0.3s ease;
}

.music-player.active {
    display: block;
}

.music-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.music-title {
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.95rem;
}

.music-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.music-close:hover {
    color: var(--color-white);
}

.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.music-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2a2a2a;
    border: 1px solid #333;
    color: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.music-btn:hover {
    background: #333;
    border-color: #444;
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.music-btn svg {
    width: 20px;
    height: 20px;
}

.music-btn.play-pause {
    width: 50px;
    height: 50px;
}

.music-playlist {
    max-height: 200px;
    overflow-y: auto;
}

.playlist-item {
    padding: 0.75rem;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--color-white);
    font-size: 0.9rem;
}

.playlist-item:hover {
    background: #333;
    border-color: #444;
}

.playlist-item.active {
    background: #00ff41;
    border-color: #00ff41;
    color: #0a0a0a;
    box-shadow: 0 4px 16px rgba(0, 255, 65, 0.3);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

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

    .main-name {
        font-size: 2.5rem;
    }

    .profile-avatar {
        width: 150px;
        height: 150px;
    }

    .avatar-glow {
        width: 170px;
        height: 170px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cyber-btn {
        width: 100%;
        justify-content: center;
    }

    .terminal-container,
    .projects-container {
        width: 95%;
        max-height: 85vh;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .music-player {
        width: 280px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .main-card {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }

    .main-name {
        font-size: 2rem;
    }

    .username {
        font-size: 1.25rem;
    }

    .profile-header {
        margin-bottom: 2rem;
    }

    .action-buttons {
        margin-bottom: 2rem;
    }

    .social-links {
        padding-top: 1.5rem;
    }

    .music-player {
        width: calc(100vw - 4rem);
        right: 1rem;
    }
}

