/* 
   CVOS Lab - Tuan Minh Le subsite styles
   Midnight Glassmorphic style sheet copied from Hieu's styles
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #f1f1f2;
    --bg-card: #ffffff;
    --border-card: rgba(35, 113, 148, 0.12);
    --border-hover: rgba(0, 187, 214, 0.4);
    --text-primary: #237194;
    --text-secondary: #3b5a6c;
    --text-muted: #648293;
    --accent-purple: #237194;
    --accent-cyan: #00bbd6;
    --accent-blue: #faa32b;
    --glow-purple: rgba(35, 113, 148, 0.06);
    --glow-cyan: rgba(0, 187, 214, 0.06);
    --nav-height: 80px;
    --font-outfit: 'Outfit', sans-serif;
    --font-inter: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    background-image: radial-gradient(rgba(35, 113, 148, 0.04) 1px, transparent 0);
    background-size: 24px 24px;
    color: var(--text-primary);
    font-family: var(--font-inter);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Gradients Glow */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bg-glow::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -15%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--glow-purple) 0%, transparent 70%);
    filter: blur(100px);
}

.bg-glow::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -15%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--glow-cyan) 0%, transparent 70%);
    filter: blur(100px);
}

/* Navigation Bar (Glassmorphic) */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(241, 241, 242, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-card);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 40px;
}

.logo {
    margin-right: auto;
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

nav {
    display: flex;
    gap: 32px;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-outfit);
    transition: color 0.3s ease, text-shadow 0.3s ease;
    position: relative;
    padding: 8px 0;
}

nav a:hover, nav a.active {
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    transition: width 0.3s ease;
}

nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* Page Container Layout */
main {
    max-width: 1200px;
    margin: 120px auto 60px;
    padding: 0 40px;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    margin-bottom: 80px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.hero-content * {
    pointer-events: auto;
}

.hero-subtitle {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-cyan);
    margin-bottom: 12px;
}

.hero-title {
    font-family: var(--font-outfit);
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(to right, var(--text-primary), #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-bio {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-outfit);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-btn.primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(35, 113, 148, 0.2);
}

.social-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 187, 214, 0.4);
    color: #ffffff;
}

.social-btn.secondary {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
}

.social-btn.secondary:hover {
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-primary);
    border-color: var(--text-muted);
    transform: translateY(-2px);
}

.hero-img-container {
    width: 320px;
    height: 320px;
    position: relative;
    z-index: 2;
}

.hero-img-container::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    z-index: -1;
    animation: rotateGlow 10s linear infinite;
}

.hero-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-main);
    border: 4px solid var(--bg-main);
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Grid Sections (Card Layouts) */
.section-title {
    font-family: var(--font-outfit);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 2px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Glassmorphic Card */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 36px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.02);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(6, 182, 212, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(35, 113, 148, 0.1);
}

.glass-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 36px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-title {
    font-family: var(--font-outfit);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.card-desc {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* Publications Page Styling */
.filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: 20px;
    font-family: var(--font-outfit);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--accent-purple);
    color: #ffffff;
    border-color: var(--accent-purple);
    box-shadow: 0 4px 15px rgba(35, 113, 148, 0.35);
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pub-item {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-card);
    padding: 24px 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.pub-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 187, 214, 0.25);
    transform: translateX(4px);
}

.pub-num {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-cyan);
    min-width: 24px;
}

.pub-content {
    flex: 1;
}

.pub-title {
    font-family: var(--font-outfit);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;
}

.pub-title:hover {
    color: var(--accent-cyan);
}

.pub-authors {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.pub-authors strong {
    color: var(--text-primary);
}

.pub-journal {
    color: var(--accent-purple);
    font-size: 14px;
    font-weight: 500;
}

.pub-year {
    font-size: 14px;
    color: var(--text-muted);
}

/* Contact Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 24px 30px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.contact-icon {
    font-size: 28px;
    color: var(--accent-cyan);
}

.contact-details h4 {
    font-family: var(--font-outfit);
    font-size: 18px;
    margin-bottom: 4px;
}

.contact-details p {
    color: var(--text-secondary);
    font-size: 14px;
}

.contact-details a {
    color: var(--accent-purple);
    text-decoration: none;
    font-weight: 500;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* Footer Section */
footer {
    border-top: 1px solid var(--border-card);
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    font-family: var(--font-outfit);
}

/* Mobile responsive styles */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-img-container {
        order: -1;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* AI Neural Canvas Styles */
.ai-canvas-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
    margin: 40px 0 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ai-canvas-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
    pointer-events: none;
}

.ai-canvas-title {
    font-family: var(--font-outfit);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ai-canvas-desc {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* SVG Animations */
.animated-svg-avatar {
    width: 80px;
    height: 80px;
}

.svg-gear {
    transform-origin: center;
    animation: spinGear 8s linear infinite;
    fill: var(--accent-cyan);
}

.svg-neural-core {
    animation: pulseCore 2s ease-in-out infinite alternate;
    fill: var(--accent-purple);
}

.svg-wave {
    animation: waveMotion 1.5s ease-in-out infinite alternate;
    stroke: var(--accent-blue);
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}

.svg-hat-glow {
    animation: pulseHat 3s ease-in-out infinite alternate;
    fill: var(--accent-cyan);
}

@keyframes spinGear {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseCore {
    0% { transform: scale(0.95); opacity: 0.6; }
    100% { transform: scale(1.08); opacity: 1; }
}

@keyframes waveMotion {
    0% { stroke-dashoffset: 40; }
    100% { stroke-dashoffset: -40; }
}

@keyframes pulseHat {
    0% { opacity: 0.3; }
    100% { opacity: 0.9; }
}

/* Hero Slanted Layout (Alan Turing Institute Style) */
.hero-slant-container {
    position: relative;
    width: 100%;
    height: 640px; /* Increased from 580px to show more vertical detail and majestic scale */
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-card);
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(35, 113, 148, 0.05);
    margin-bottom: 60px;
    display: flex;
}

.hero-canvas-panel {
    width: 52%;
    height: 100%;
    position: relative;
    background-color: #ffffff;
}

.hero-slant-intro {
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 52%;
    background: url('image/Avatar.jpeg') no-repeat bottom right / cover; /* No mask over Tuan's figure */
    z-index: 10;
    clip-path: polygon(112px 0, 100% 0, 100% 100%, 0 100%); /* Perfect 80-degree boundary slash */
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 35px 40px 40px 50px; /* Reduced left padding to allow slanted margins */
    box-sizing: border-box;
}

.slant-bio-card {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Reduced gap to pull links higher */
    border: none;
}

.hero-profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 94px; /* Aligned parallel to the 80-degree slash boundary (pushed leftward) */
}

.hero-avatar-wrapper {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.hero-avatar-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    z-index: 1;
}

.hero-avatar {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    background-color: #ffffff;
}

.hero-title-area {
    display: flex;
    flex-direction: column;
}

.hero-subtitle {
    font-family: var(--font-outfit);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #bae6fd; /* Light Sky Blue for high-contrast visibility */
    margin-bottom: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-title-text {
    font-family: var(--font-outfit);
    font-size: 24px;
    font-weight: 800;
    color: #ffffff; /* Bright white text for contrast */
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-bio-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: 62px; /* Stepped 80-degree negative indent (pushed leftward) */
}

.hero-bio-text {
    font-size: 15px;
    color: #ffffff; /* Bright white text for contrast */
    line-height: 1.75;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-bio-container strong {
    color: #38bdf8; /* Vibrant light sky-cyan highlights */
    font-weight: 700;
}

.hero-bio-subtext {
    font-size: 13.5px;
    color: #ffffff; /* Bright white subtext */
    line-height: 1.7;
    margin: 0;
    max-width: 45%; /* Limit width to the left to avoid overlapping Tuan sitting on the bench */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Custom button overrides inside the slanted panel */
.slant-bio-card .social-links {
    margin-left: 30px; /* Stepped 80-degree negative indent (pushed leftward) */
    margin-top: 14px; /* Elegant vertical spacing to push the buttons down a bit */
    gap: 16px;
}

.slant-bio-card .social-btn.primary {
    background: #faa32b; /* Solid warm gold */
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(250, 163, 43, 0.3);
    border: none;
}

.slant-bio-card .social-btn.primary:hover {
    background: #e28e1c;
    box-shadow: 0 6px 20px rgba(250, 163, 43, 0.5);
    transform: translateY(-2px);
}

.slant-bio-card .social-btn.secondary {
    background: rgba(15, 23, 42, 0.05);
    border: 1.5px solid rgba(15, 23, 42, 0.35);
    color: #1e293b;
}

.slant-bio-card .social-btn.secondary:hover {
    background: rgba(15, 23, 42, 0.12);
    border-color: #0f172a;
    color: #0f172a;
    transform: translateY(-2px);
}

.canvas-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

@media (max-width: 992px) {
    .hero-slant-container {
        height: auto;
        flex-direction: column;
    }
    
    .hero-canvas-panel {
        width: 100%;
        height: 320px;
    }
    
    .hero-slant-intro {
        position: relative;
        width: 100%;
        clip-path: none;
        padding: 40px 24px;
        right: 0;
    }
    
    .slant-bio-card {
        max-width: 100%;
    }

    .hero-bio-subtext {
        max-width: 100%;
    }
    
    .intro-image-wrapper {
        margin-left: 0;
        max-width: 240px;
        margin: 20px auto 10px;
    }
}

.intro-image-wrapper {
    margin-left: 62px;
    max-width: 45%;
    margin-top: 15px;
    margin-bottom: 5px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.intro-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.intro-image-wrapper:hover {
    transform: scale(1.02);
}

/* --- Tuan's Thought Bubble Decor Animations --- */
@keyframes floatSparkle {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-4px) scale(1.15) rotate(15deg);
        opacity: 1;
    }
}

@keyframes pulseHeart {
    0% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 0.9;
    }
}

@keyframes borderGlowPulse {
    0% {
        box-shadow: 0 8px 24px rgba(236, 72, 153, 0.15), 0 4px 12px rgba(250, 163, 43, 0.1);
    }
    100% {
        box-shadow: 0 16px 36px rgba(236, 72, 153, 0.35), 0 8px 20px rgba(250, 163, 43, 0.25);
    }
}


