/* Base Styles */
body {
    background-color: black;
    color: white;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

::selection {
    background-color: white;
    color: black;
}

.font-display {
    font-family: 'Space Grotesk', sans-serif;
}

/* Custom Effects */
.hero-text-glow {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.2), 0 0 60px rgba(255, 255, 255, 0.1);
    background-size: 200% auto;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.timeline-line-glow {
    background: linear-gradient(to bottom, transparent, #fff, #333, #fff, transparent);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3), 0 0 30px rgba(255, 255, 255, 0.1);
}

.glass-card {
    background-color: rgba(24, 24, 27, 0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 5;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

#education-timeline {
    display: flex;
    flex-direction: column;
    gap: 8rem;
}

/* Animations */
@keyframes mesh-move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(2%, 2%) scale(1.1);
    }

    66% {
        transform: translate(-1%, 3%) scale(0.95);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes scan {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-mesh {
    animation: mesh-move 20s ease-in-out infinite alternate;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes box-glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.02);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.08);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 0;
    /* Hidden initially for IntersectionObserver */
}

@keyframes blob-move {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, 5%) scale(1.1);
    }

    66% {
        transform: translate(-3%, 7%) scale(0.95);
    }
}

.animate-blob-slow {
    animation: blob-move 20s ease-in-out infinite alternate;
}

.animate-blob-slower {
    animation: blob-move 30s ease-in-out infinite alternate-reverse;
}

.timeline-scan {
    position: absolute;
    width: 100%;
    height: 20%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: scan 4s linear infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .font-display {
        letter-spacing: -0.01em;
    }

    /* Academic Log Redesign for Mobile */
    #education-timeline {
        display: flex;
        flex-direction: column;
        gap: 0.25rem !important;
        /* Near-zero gap */
        position: relative;
    }

    #education-timeline .flex-col {
        align-items: flex-start !important;
        /* Changed to left-aligned log */
        padding: 0 1rem !important;
    }

    .timeline-line-glow,
    .timeline-dot {
        display: none !important;
        /* Hide line and dots on mobile */
    }

    .academic-log-item {
        width: 100% !important;
        max-width: none !important;
        background: linear-gradient(135deg, #09090b, #18181b, #09090b) !important;
        background-size: 200% 200% !important;
        animation: gradient-move 8s ease infinite, box-glow 4s ease-in-out infinite !important;
        border-left: 2px solid rgba(255, 255, 255, 0.3) !important;
        padding: 1rem 1.25rem !important;
        /* Even more compact padding */
        border-radius: 0 0.75rem 0.75rem 0 !important;
        text-align: left !important;
        margin: 0 !important;
        -webkit-backdrop-filter: blur(20px) !important;
        backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.03) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.03) !important;
    }

    .log-year-stamp {
        font-family: 'Space Mono', monospace;
        font-size: 0.7rem !important;
        color: #52525b !important;
        margin-bottom: 0.5rem !important;
        display: block;
        letter-spacing: 0.2em;
        font-weight: 500;
    }

    .log-title {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.25rem !important;
        color: #fff !important;
        text-align: left !important;
        justify-content: flex-start !important;
    }

    .log-institution {
        font-size: 0.8rem !important;
        color: #71717a !important;
        margin-bottom: 0.75rem !important;
    }

    .log-desc {
        font-size: 0.75rem !important;
        line-height: 1.6 !important;
        color: #52525b !important;
    }

    .connective-arrow {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2)) !important;
        opacity: 0.6 !important;
    }

    /* Hero Section Mobile Fixes */
    .hero-text-glow {
        font-size: 3.5rem !important;
        line-height: 1.1 !important;
        letter-spacing: -0.05em !important;
    }

    .hero-subtext {
        font-size: 1.1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 2rem !important;
    }

    /* Profile Image Mobile Fixes */
    .profile-container {
        width: 240px !important;
        height: 240px !important;
    }

    .profile-bg-accent {
        transform: rotate(3deg) !important;
    }

    /* Social Icons Mobile Fixes */
    .social-links-container {
        gap: 1.5rem !important;
        margin-top: 1rem !important;
        justify-content: center !important;
        width: 100% !important;
    }
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}