/* Custom styles for personal website enhancements */

/* Make the About section image smaller and more professional */
#intro .image.main {
    max-width: 400px;
    margin: 2rem auto;
    display: block;
}

#intro .image.main img {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.2);
}

@media screen and (max-width: 736px) {
    #intro .image.main {
        max-width: 300px;
        margin: 1.5rem auto;
    }
}

@media screen and (max-width: 480px) {
    #intro .image.main {
        max-width: 250px;
        margin: 1rem auto;
    }
}

/* Section header + tagline tweaks for a more product-focused feel */
#header .content .inner h1 {
    letter-spacing: 0.35em;
}

.tagline {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.highlight {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Consistent article container */
.article-shell {
    background: rgba(6, 10, 20, 0.92);
    border: 1px solid rgba(58, 134, 255, 0.2);
    border-radius: 18px;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px);
}

@media screen and (max-width: 980px) {
    .article-shell {
        padding: 2.25rem 1.75rem;
    }
}

@media screen and (max-width: 736px) {
    .article-shell {
        padding: 1.75rem 1.25rem;
    }
}

/* Futuristic neural icon in the header */
.neural-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.neural-icon svg {
    width: 70%;
    height: 70%;
    animation: neural-spin 80s linear infinite, neural-pulse 1.6s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(58, 134, 255, 0.55)) drop-shadow(0 0 14px rgba(0, 217, 255, 0.45));
}

@keyframes neural-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes neural-pulse {
    0% {
        transform-origin: center;
        opacity: 1.9;
        filter: drop-shadow(0 0 8px rgba(58, 134, 255, 0.4));
    }
    50% {
        transform-origin: center;
        opacity: 1;
        filter: drop-shadow(0 0 14px rgba(58, 134, 255, 0.7));
    }
    100% {
        transform-origin: center;
        opacity: 0.9;
        filter: drop-shadow(0 0 8px rgba(58, 134, 255, 0.4));
    }
}

/* Constrain article width for better readability on large screens */
#main article {
    max-width: 900px;
    margin: 0 auto;
}

/* Shared section icon styling (Experience, Projects, Publications) */
.section-icon-wrapper {
    text-align: center;
    margin: 2rem 0 2.5rem;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(58, 134, 255, 0.8);
    background: rgba(10, 17, 40, 0.85);
    box-shadow: 0 0 18px rgba(58, 134, 255, 0.35);
    color: #3a86ff;
    animation: icon-shift 2.2s ease-in-out infinite;
}

.section-icon svg {
    width: 70%;
    height: 70%;
}

/* Timeline-style cards for experience, projects, etc. */
.timeline-card {
    position: relative;
    border-left: 3px solid rgba(58, 134, 255, 0.5);
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
}

.timeline-card h3 {
    color: #3a86ff;
    margin-bottom: 0.35rem;
}

.timeline-company {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.timeline-meta {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.timeline-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.timeline-meta .meta-item i {
    color: #3a86ff;
}

.timeline-points {
    margin-top: 0.75rem;
}

.timeline-points li {
    margin-bottom: 0.4rem;
}

@media screen and (max-width: 736px) {
    .timeline-card {
        padding-left: 1.1rem;
        border-left-width: 2px;
    }

    .timeline-meta {
        flex-direction: column;
        gap: 0.35rem;
    }
}

/* Animated icons */
@keyframes icon-shift {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(8px);
    }
}

.section-icon svg {
    transition: transform 0.3s ease;
}

.section-icon:hover svg {
    transform: scale(1.08);
}

/* Subtle polish for contact icons to match the rest of the UI */
.contact-icons-container {
    max-width: 540px;
    margin: 2rem auto 0;
}

.contact-icon {
    backdrop-filter: blur(6px);
}

/* Align the Projects/Research divider with the button boundary */
#header nav.use-middle:after {
    display: none;
}

#header nav.use-middle ul li {
    position: relative;
}

#header nav.use-middle ul li.is-middle {
    border-left: none !important;
}

#header nav.use-middle ul li.is-middle::before {
    content: '';
    position: absolute;
    left: -1px;
    top: -1px;
    width: 2px;
    height: calc(100% + 2px);
    background: rgba(58, 134, 255, 0.45);
    box-shadow: 0 0 6px rgba(58, 134, 255, 0.35);
}

@media screen and (min-width: 737px) {
    #header nav ul {
        transform: translateX(-14px);
    }

    #header nav.use-middle ul li.is-middle::before {
        left: calc(-1px + 14px);
    }
}

/* AI-inspired layered background */
body {
    background-attachment: fixed;
}

#bg {
    pointer-events: none;
}

#bg:before {
    background: radial-gradient(circle at 50% 20%, rgba(58, 134, 255, 0.18), transparent 60%), radial-gradient(circle at 15% 70%, rgba(0, 217, 255, 0.15), transparent 45%), linear-gradient(125deg, rgba(3, 8, 20, 0.95), rgba(5, 7, 18, 0.95)) !important;
    opacity: 1;
}

#bg:after {
    background-image: radial-gradient(circle at center, rgba(58, 134, 255, 0.25) 0%, rgba(4, 10, 26, 0.05) 45%, transparent 70%), url('../images/ai-network.svg') !important;
    background-size: 160% 160%, 110%;
    background-position: center, center;
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: ai-grid-rotate 80s linear infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 20px rgba(58, 134, 255, 0.35));
}

@keyframes ai-grid-rotate {
    0% {
        transform: scale(1.15) rotate(0deg);
    }
    100% {
        transform: scale(1.15) rotate(360deg);
    }
}

/* Conferences & Talks section styling */
#conferences ul {
    list-style: none;
    padding-left: 0;
}

#conferences ul li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(58, 134, 255, 0.15);
}

#conferences ul li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

#conferences ul li a {
    color: #00d9ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

#conferences ul li a:hover {
    color: #3a86ff;
    text-decoration: underline;
}
