/* Neobrutalist Portfolio Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(-5deg);
    }
}

@keyframes reveal-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes reveal-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes reveal-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 0, 0, 0);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
}

.reveal-up {
    opacity: 0;
    animation: reveal-up 0.8s ease-out forwards;
}

.reveal-left {
    opacity: 0;
    animation: reveal-left 0.8s ease-out forwards;
}

.reveal-right {
    opacity: 0;
    animation: reveal-right 0.8s ease-out forwards;
}

/* Navigation Styles */
.neo-nav {
    transition: all 0.3s ease;
}

.neo-nav.scrolled {
    transform: translateX(-50%) scale(0.9);
}

.nav-item {
    padding: 0.75rem 1.5rem;
    font-weight: 900;
    font-size: 0.875rem;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.nav-item:hover {
    background: #FFE500;
    color: black;
    border: 2px solid black;
    transform: translateY(-2px);
}

.nav-item.active {
    background: #FF006E;
    color: white;
    border: 2px solid white;
}

@media (max-width: 768px) {
    .nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Neo Tags */
.neo-tag {
    padding: 0.5rem 1rem;
    border: 3px solid black;
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
    display: inline-block;
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
}

.neo-tag:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 1);
}

.neo-tag-small {
    padding: 0.25rem 0.75rem;
    border: 2px solid black;
    font-weight: 700;
    font-size: 0.75rem;
    color: white;
    display: inline-block;
    box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
}

/* Neo Cards */
.neo-card {
    padding: 2rem;
    border: 4px solid black;
    box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.neo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.neo-card:hover::before {
    transform: translateX(0);
}

.neo-card:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px 0px rgba(0, 0, 0, 1);
}

/* Neo Button */
.neo-button {
    padding: 1rem 2rem;
    border: 4px solid black;
    font-weight: 900;
    font-size: 1rem;
    color: white;
    background: black;
    cursor: pointer;
    box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
    text-transform: uppercase;
    width: 100%;
}

.neo-button:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 1);
}

.neo-button:active {
    transform: translate(6px, 6px);
    box-shadow: none;
}

/* Filter Buttons */
.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 3px solid black;
    background: white;
    font-weight: 900;
    font-size: 0.875rem;
    cursor: pointer;
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.filter-btn:hover {
    background: #FFE500;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 1);
}

.filter-btn.active {
    background: black;
    color: white;
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* Publication Items */
.publication-item {
    background: white;
    border: 4px solid black;
    padding: 1.5rem;
    box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.publication-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0px 0px rgba(0, 0, 0, 1);
}

.publication-item.hidden {
    display: none;
}

.publication-item .pub-year {
    background: #FFE500;
    border: 4px solid black;
    padding: 0.5rem 1rem;
    font-weight: 900;
    font-size: 1.25rem;
    width: fit-content;
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 1);
}

.publication-item .pub-content h3 {
    font-weight: 900;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.publication-item .pub-content .authors {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.publication-item .pub-content .venue {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.publication-item .pub-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.publication-item .pub-tags .tag {
    padding: 0.25rem 0.75rem;
    border: 2px solid black;
    background: #8B5CF6;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 1);
}

@media (min-width: 768px) {
    .publication-item {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .publication-item .pub-year {
        flex-shrink: 0;
    }
    
    .publication-item .pub-content {
        flex: 1;
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 6px;
    background: linear-gradient(90deg, #FFE500, #FF006E, #00F5FF, #00FF85);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: white;
    border-left: 4px solid black;
}

::-webkit-scrollbar-thumb {
    background: black;
    border: 2px solid white;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF006E;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .neo-card {
        padding: 1.5rem;
        box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 1);
    }
    
    .neo-card:hover {
        transform: translate(-3px, -3px);
        box-shadow: 9px 9px 0px 0px rgba(0, 0, 0, 1);
    }
    
    .neo-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid black;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

/* Glitch Effect for Headers */
@keyframes glitch {
    0% {
        text-shadow: 2px 2px #FF006E, -2px -2px #00F5FF;
    }
    25% {
        text-shadow: -2px 2px #00F5FF, 2px -2px #FFE500;
    }
    50% {
        text-shadow: 2px -2px #00FF85, -2px 2px #FF006E;
    }
    75% {
        text-shadow: -2px -2px #FFE500, 2px 2px #00F5FF;
    }
    100% {
        text-shadow: 2px 2px #FF006E, -2px -2px #00F5FF;
    }
}

h1:hover,
h2:hover {
    animation: glitch 0.3s ease;
}

/* Bento Grid Effect */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.bento-item:nth-child(3n) {
    grid-column: span 2;
}

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Text Selection */
::selection {
    background: #FFE500;
    color: black;
}

::-moz-selection {
    background: #FFE500;
    color: black;
}

/* Focus Styles */
*:focus {
    outline: 4px solid #FF006E;
    outline-offset: 4px;
}

/* Smooth Transitions */
* {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile Navigation */
#mobileNav {
    backdrop-filter: blur(10px);
}

.mobile-nav-item {
    position: relative;
    padding: 1rem 2rem;
    text-align: center;
    border: 4px solid transparent;
    transition: all 0.3s ease;
}

.mobile-nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 4px;
    background: currentColor;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.mobile-nav-item:hover::before {
    width: 80%;
}

.mobile-nav-item:active {
    transform: scale(0.95);
}

/* Mobile Menu Button Animation */
#mobileMenuBtn {
    overflow: hidden;
}

#menuIcon {
    transition: transform 0.3s ease;
}

#mobileMenuBtn:hover #menuIcon {
    transform: rotate(90deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 40;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {
    .neo-nav,
    #mobileMenuBtn,
    footer {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .neo-card,
    .publication-item {
        box-shadow: none;
        border: 2px solid black;
        page-break-inside: avoid;
    }
}
