/* ===== MINIMAL STATUS BAR WITH PROPER GLASSMORPHISM ===== */
/* Performance optimizations */
* {
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.1s !important;
    }
}

/* ===== MINIMAL STATUS BAR WITH PROPER GLASSMORPHISM ===== */
.status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.pill-menu-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 8px;
    pointer-events: auto;
}

.pill-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    /* PROPER GLASSMORPHISM RESTORED */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px;
    gap: 4px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
    pointer-events: auto;
    width: auto;
    min-width: 200px;
}

.portfolio-title {
    padding: 8px 16px;
    color: #ffffff; /* Simple white text */
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    /* REMOVED GLASSMORPHISM BACKGROUND - NOW TRANSPARENT */
    background: transparent;
    border: none;
    border-radius: 0;
    margin-right: 8px;
    /* SIMPLE WHITE TEXT - NO EFFECTS */
    text-shadow: none;
    white-space: nowrap;
}
.portfolio-title:hover {
  
    color: rgba(255, 221, 0, 0.962);
}

.pills-row {
    display: flex;
    gap: 4px;
}

.pill-item {
    padding: 8px 16px;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    /* REMOVED EFFECTS - SIMPLE TEXT */
    text-shadow: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    white-space: nowrap;
}

.pill-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.95);
}

.pill-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.pill-item:active {
    transform: scale(0.95);
}

/* ===== FLOATING INDIVIDUAL CARDS WITHOUT CONTAINER BACKGROUND ===== */
.content-cards {
    position: fixed;
    top: 85px; /* Increased from 70px for better mobile spacing */
    left: 50%;
    transform: translateX(-50%);
    width: min(400px, 90vw);
    /* REMOVED BACKGROUND - NOW TRANSPARENT CONTAINER */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    padding: 0; /* Removed padding */
    box-shadow: none; /* Removed container shadow */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9998;
    /* INCREASED SPACING BETWEEN CARDS */
    display: flex;
    flex-direction: column;
    gap: 16px; /* Space between floating cards */
}

.content-cards.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.content-card {
    /* ENHANCED INDIVIDUAL CARD GLASSMORPHISM */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 18px; /* Increased padding for better floating appearance */
    margin-bottom: 0; /* Removed margin since we use gap now */
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    /* EACH CARD FLOATS INDEPENDENTLY */
    position: relative;
}

.content-card:last-child {
    margin-bottom: 0;
}

.content-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.content-card:active {
    transform: scale(0.98);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.card-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(100, 200, 255, 0.9);
    box-shadow: 0 0 8px rgba(100, 200, 255, 0.5);
    animation: simple-pulse 2s infinite;
}

@keyframes simple-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff; /* Simple white text */
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    /* REMOVED EFFECTS - SIMPLE WHITE TEXT */
    text-shadow: none;
}

.card-content {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 20px; /* Increased space before pill links */
    /* REMOVED EFFECTS - SIMPLE TEXT */
    text-shadow: none;
}

/* ADD SPACING BETWEEN MULTIPLE PILL LINKS IN CARDS */
.card-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    pointer-events: auto;
    padding: 6px 12px;
    /* PILL SHAPE */
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
    white-space: nowrap;
    /* REMOVED EFFECTS - SIMPLE TEXT */
    text-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    /* SEPARATE PILL LINKS */
    margin-right: 8px;
    margin-bottom: 8px;
}

.card-link:last-child {
    margin-right: 0;
}

.card-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ===== MODAL BACKDROP - NO BLUR, JUST TRANSPARENCY ===== */
.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.4) !important;
    /* REMOVED BACKDROP FILTER - NO BACKGROUND BLUR */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 10010 !important;
    display: none !important;
    overscroll-behavior: none !important;
}

.modal-backdrop.active {
    display: block !important;
}

/* ===== GLASSMORPHISM MODAL - MATCHING STATUS BAR STYLE ===== */
.info-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    
    /* GLASSMORPHISM MATCHING STATUS BAR */
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    
    padding: clamp(16px, 4vw, 24px) !important;
    max-width: min(92vw, 700px) !important;
    width: 92vw !important;
    max-height: 88vh !important;
    color: rgba(255, 255, 255, 0.95) !important;
    z-index: 10011 !important;
    display: none !important;
    
    /* ENHANCED GLASSMORPHISM SHADOW */
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transition: all 0.3s ease !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
}

.info-modal.active {
    display: block !important;
    animation: modal-entrance 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes modal-entrance {
    from { 
        opacity: 0; 
        transform: translate(-50%, -45%) scale(0.9);
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ===== MODAL HEADER - GLASSMORPHISM STYLE ===== */
.modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    padding: clamp(12px, 3vw, 16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    
    /* GLASSMORPHISM MATCHING STATUS BAR CARDS */
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.modal-title {
    font-size: clamp(16px, 4vw, 20px) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.5px !important;
    flex: 1 !important;
    font-family: 'TheGoodMonolith', -apple-system, BlinkMacSystemFont, sans-serif !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
    text-shadow: none !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: calc(100% - 50px) !important;
}

/* ===== YELLOW CLOSE BUTTON - MATCHING FLOATING NUMBERS ===== */
.close-btn {
    /* YELLOW GLASSMORPHISM STYLE - MATCHING FLOATING NUMBERS */
    background: rgba(255, 215, 0, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 2px solid rgba(255, 170, 0, 0.9) !important;
    color: #ffffff !important; /* Dark text like the floating numbers */
    font-size: clamp(16px, 4vw, 20px) !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: clamp(36px, 8vw, 44px) !important;
    height: clamp(36px, 8vw, 44px) !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    font-weight: bold !important;
    font-family: 'TheGoodMonolith', -apple-system, BlinkMacSystemFont, sans-serif !important;
    
    /* MATCHING GLOW EFFECT FROM FLOATING NUMBERS */
    box-shadow: 
        0 0 12px rgba(255, 170, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    
    flex-shrink: 0 !important;
}

.close-btn:hover {
    background: rgba(255, 170, 0, 0.95) !important;
    border-color: rgba(255, 140, 0, 1) !important;
    color: white !important;
    transform: scale(1.05) !important;
    box-shadow: 
        0 0 20px rgba(255, 170, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.close-btn:active {
    transform: scale(0.95) !important;
    background: rgba(255, 170, 0, 0.95) !important;
    color: white !important;
    box-shadow: 
        0 0 16px rgba(255, 170, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* PULSE ANIMATION LIKE FLOATING NUMBERS */
.close-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 170, 0, 0.756);
    animation: simple-pulse 1.8s infinite;
    z-index: -1;
}

@keyframes simple-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ===== MODAL CONTENT SECTIONS ===== */
.modal-content {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

.modal-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== MODAL IMAGE - GLASSMORPHISM STYLE ===== */
.modal-image {
    width: 100% !important;
    aspect-ratio: 16/9 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
    margin-bottom: 8px !important;
    
    /* GLASSMORPHISM MATCHING STATUS BAR */
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.modal-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.modal-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 14px !important;
}

/* ===== MODAL DETAILS ===== */
.modal-details {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* ===== PROJECT DESCRIPTION - GLASSMORPHISM ===== */
.project-description {
    line-height: 1.6 !important;
    font-size: clamp(13px, 3.5vw, 15px) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    
    /* GLASSMORPHISM MATCHING STATUS BAR CARDS */
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 16px !important;
    padding: clamp(16px, 4vw, 20px) !important;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    margin: 0 0 16px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
}

/* ===== TECH STACK - GLASSMORPHISM PILLS ===== */
.tech-stack {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: clamp(8px, 2vw, 10px) !important;
    justify-content: center !important;
    align-items: flex-start !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.tech-tag {
    /* GLASSMORPHISM MATCHING STATUS BAR PILLS */
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    padding: clamp(8px, 2vw, 10px) clamp(12px, 3vw, 14px) !important;
    font-size: clamp(10px, 2.5vw, 12px) !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    text-align: center !important;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(50% - 4px) !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    min-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tech-tag:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px) !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* ===== PROJECT LINKS - GLASSMORPHISM PILLS ===== */
.project-links {
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.project-links h4 {
    margin: 0 0 clamp(12px, 3vw, 16px) 0 !important;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: clamp(13px, 3.5vw, 15px) !important;
    font-weight: 700 !important;
    font-family: 'TheGoodMonolith', -apple-system, BlinkMacSystemFont, sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.links-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(10px, 2.5vw, 12px) !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.project-link {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(8px, 2vw, 10px) !important;
    padding: clamp(10px, 3vw, 14px) clamp(16px, 4vw, 20px) !important;
    
    /* GLASSMORPHISM MATCHING STATUS BAR PILLS */
    background: rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 50px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif !important;
    min-height: clamp(40px, 9vw, 44px) !important;
    font-size: clamp(11px, 2.8vw, 13px) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    transform: translateY(-1px) !important;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.project-link:active {
    transform: scale(0.98) !important;
}

.link-icon {
    font-size: clamp(14px, 3.5vw, 18px) !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) !important;
    flex-shrink: 0 !important;
}

.link-text {
    font-size: clamp(11px, 2.8vw, 13px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    flex: 1 !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (min-width: 769px) {
    .modal-main {
        flex-direction: row !important;
        gap: 24px !important;
        align-items: flex-start !important;
    }
    
    .modal-image {
        flex: 0 0 45% !important;
        max-width: 45% !important;
        aspect-ratio: 1 !important;
        margin-bottom: 0 !important;
    }
    
    .modal-details {
        flex: 1 !important;
        max-width: 55% !important;
    }
    
    .links-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .tech-tag:hover,
    .project-link:hover,
    .close-btn:hover {
        transform: none !important;
        background: inherit !important;
    }
}
.link-text {
    font-size: clamp(10px, 2.5vw, 12px) !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    flex: 1 !important;
    text-align: center !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (max-width: 768px) {
    .pill-menu {
        flex-direction: column;
        min-width: auto;
        width: min(300px, 90vw);
        gap: 3px;
        padding: 4px;
    }
    
    .portfolio-title {
        margin-right: 0;
        margin-bottom: 2px;
        width: 100%;
        text-align: center;
        background: transparent;
        border: none;
        font-size: 11px;
        padding: 4px 12px;
        text-shadow: none;
    }
    
    .pills-row {
        width: 100%;
        justify-content: center;
        gap: 2px;
    }
    
    .pill-item {
        flex: 1;
        text-align: center;
        font-size: 10px;
        padding: 6px 12px;
        max-width: 120px;
    }
    
    .content-cards {
        width: min(320px, 95vw);
        top: 95px;
        padding: 0;
        gap: 12px;
    }
    
    .content-card {
        padding: 16px;
    }
    
    .card-content {
        font-size: 12px;
    }
    
    .info-modal {
        padding: 12px !important;
        max-width: 95vw !important;
        width: 95vw !important;
        max-height: 90vh !important;
        border-radius: 16px !important;
    }
    
    .modal-main {
        gap: 12px !important;
    }
    
    .modal-details {
        gap: 12px !important;
    }
    
    .tech-stack {
        gap: 4px !important;
        justify-content: center !important;
    }
    
    .tech-tag {
        font-size: 8px !important;
        padding: 4px 8px !important;
        max-width: calc(50% - 2px) !important;
        border-radius: 16px !important;
        min-height: 24px !important;
    }
    
    .links-grid {
        gap: 6px !important;
    }
    
    .project-link {
        font-size: 9px !important;
        padding: 6px 10px !important;
        min-height: 32px !important;
        gap: 4px !important;
    }
    
    .link-icon {
        font-size: 10px !important;
    }
    
    .link-text {
        font-size: 9px !important;
    }
    
    .project-description {
        font-size: 11px !important;
        padding: 10px !important;
        line-height: 1.4 !important;
    }
    
    .modal-header {
        padding: 8px !important;
        margin-bottom: 12px !important;
        gap: 8px !important;
    }
    
    .modal-title {
        font-size: 14px !important;
        max-width: calc(100% - 40px) !important;
    }
}

/* ===== DESKTOP LAYOUT FIXES ===== */
@media (min-width: 769px) {
    .info-modal {
        max-width: min(85vw, 800px) !important;
        width: 85vw !important;
        max-height: 80vh !important;
        padding: 20px !important;
    }
    
    .modal-header {
        padding: 16px !important;
        margin-bottom: 20px !important;
        gap: 12px !important;
    }
    
    .modal-title {
        font-size: 20px !important;
        max-width: calc(100% - 60px) !important;
    }
    
    .close-btn {
        width: 44px !important;
        height: 44px !important;
        font-size: 20px !important;
    }
    
    .modal-main {
        flex-direction: row !important;
        gap: 24px !important;
        align-items: flex-start !important;
    }
    
    .modal-image {
        flex: 0 0 45% !important;
        max-width: 45% !important;
        aspect-ratio: 1 !important;
        margin-bottom: 0 !important;
    }
    
    .modal-details {
        flex: 1 !important;
        max-width: 55% !important;
    }
    
    .project-description {
        font-size: 14px !important;
        padding: 18px !important;
        max-height: 200px !important;
        overflow-y: auto !important;
    }
    
    .tech-stack {
        gap: 8px !important;
        justify-content: flex-start !important;
    }
    
    .tech-tag {
        font-size: 11px !important;
        padding: 8px 12px !important;
        max-width: calc(32% - 6px) !important;
        min-height: 32px !important;
    }
    
    .project-links h4 {
        font-size: 16px !important;
    }
    
    .links-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    
    .project-link {
        font-size: 12px !important;
        padding: 12px 16px !important;
        min-height: 44px !important;
    }
    
    .link-icon {
        font-size: 16px !important;
    }
    
    .link-text {
        font-size: 12px !important;
    }
}

/* ===== EXTRA LARGE SCREENS ===== */
@media (min-width: 1200px) {
    .info-modal {
        max-width: min(80vw, 900px) !important;
        width: 80vw !important;
        padding: 24px !important;
    }
    
    .modal-header {
        padding: 18px !important;
        margin-bottom: 24px !important;
    }
    
    .modal-title {
        font-size: 22px !important;
    }
    
    .close-btn {
        width: 48px !important;
        height: 48px !important;
        font-size: 22px !important;
    }
    
    .modal-main {
        gap: 32px !important;
    }
    
    .project-description {
        font-size: 15px !important;
        padding: 20px !important;
        max-height: 250px !important;
    }
    
    .tech-tag {
        font-size: 12px !important;
        padding: 9px 14px !important;
        min-height: 36px !important;
    }
    
    .project-link {
        font-size: 13px !important;
        padding: 14px 18px !important;
        min-height: 48px !important;
    }
    
    .link-text {
        font-size: 13px !important;
    }
    
    .link-icon {
        font-size: 18px !important;
    }
}

/* ===== LARGE DESKTOP SCREENS ===== */
@media (min-width: 1440px) {
    .info-modal {
        max-width: min(75vw, 1000px) !important;
        width: 75vw !important;
    }
    
    .project-description {
        font-size: 16px !important;
        line-height: 1.7 !important;
        max-height: 300px !important;
    }
}

/* ===== VERY SMALL SCREENS ===== */
@media (max-width: 320px) {
    .info-modal {
        padding: 10px !important;
        max-width: 98vw !important;
        width: 98vw !important;
        border-radius: 12px !important;
    }
    
    .tech-tag {
        font-size: 7px !important;
        padding: 3px 6px !important;
        max-width: calc(50% - 2px) !important;
        min-height: 20px !important;
    }
    
    .project-link {
        font-size: 8px !important;
        padding: 5px 8px !important;
        min-height: 28px !important;
        gap: 3px !important;
    }
    
    .link-icon {
        font-size: 9px !important;
    }
    
    .link-text {
        font-size: 8px !important;
    }
    
    .project-description {
        font-size: 10px !important;
        padding: 8px !important;
    }
    
    .modal-title {
        font-size: 12px !important;
        max-width: calc(100% - 35px) !important;
    }
    
    .close-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
}

/* ===== SCROLLBAR STYLING FOR DESKTOP ===== */
@media (min-width: 769px) {
    .project-description::-webkit-scrollbar {
        width: 4px;
    }
    
    .project-description::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 2px;
    }
    
    .project-description::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }
    
    .project-description::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }
}

/* ===== TOUCH OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    .pill-item:hover,
    .content-card:hover,
    .tech-tag:hover,
    .project-link:hover,
    .close-btn:hover,
    .card-link:hover {
        transform: none !important;
        background: inherit !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    .tech-tag,
    .project-link,
    .close-btn,
    .card-link,
    .pill-item,
    .content-card {
        transition: none !important;
    }
    
    .tech-tag:hover,
    .project-link:hover,
    .close-btn:hover,
    .card-link:hover {
        transform: none !important;
    }
    
    .info-modal.active {
        animation: none !important;
    }
    
    .card-icon {
        animation: none !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.hidden {
    display: none !important;
}

/* Prevent iOS zoom on input focus */
@media screen and (max-width: 768px) {
    input, select, textarea, button {
        font-size: 16px !important;
    }
}

/* Memory optimization: reset will-change after animations */
.info-modal:not(.active) {
    will-change: auto;
}

.tech-tag:not(:hover),
.project-link:not(:hover),
.content-card:not(:hover) {
    will-change: auto;
}

/* ===== GLOBAL OVERFLOW PROTECTION ===== */
.info-modal * {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

/* Remove any inherited floating styles and re-apply where needed */
@media (min-width: 769px) {
    .info-modal * {
        text-shadow: none !important;
        background: none !important;
        -webkit-background-clip: unset !important;
        -webkit-text-fill-color: unset !important;
        background-clip: unset !important;
    }
    
    /* Re-apply intended styles */
    .tech-tag,
    .project-link,
    .project-description {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    }
    
    .project-description {
        background: rgba(255, 255, 255, 0.08) !important;
    }
    
    .tech-tag {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    .project-link {
        background: rgba(255, 255, 255, 0.12) !important;
    }
    
    .modal-header {
        background: rgba(255, 255, 255, 0.03) !important;
    }
}

/* Canvas and container touch handling */
canvas {
    touch-action: none !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

#canvas-container {
    pointer-events: auto !important;
    touch-action: none !important;
    position: relative;
    z-index: 1;
}