/* public_html/css/home.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --font-main: 'Plus Jakarta Sans', sans-serif;
    
    /* Brand Colors */
    --primary: #6366f1; /* Indigo */
    --secondary: #8b5cf6; /* Violet */
    --accent: #f43f5e; /* Rose */
    
    /* LIGHT MODE DEFAULT */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(226, 232, 240, 0.8);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    
    /* Gradients specific for Light Mode */
    --hero-text-gradient: linear-gradient(to right, #0f172a, #475569);
    --card-gradient-large: linear-gradient(145deg, #ffffff, #f1f5f9);
    --card-gradient-tall: linear-gradient(145deg, #ffffff, #f8fafc);
    --icon-bg: rgba(99, 102, 241, 0.1);
}

/* DARK MODE OVERRIDES */
[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    
    /* Gradients specific for Dark Mode */
    --hero-text-gradient: linear-gradient(to right, #fff, #cbd5e1);
    --card-gradient-large: linear-gradient(145deg, #1e293b, #253347);
    --card-gradient-tall: linear-gradient(145deg, #1e293b, #18202f);
    --icon-bg: rgba(255, 255, 255, 0.05);
}

body {
    background-color: var(--bg-body);
    /* Pattern nền tinh tế cho cả 2 mode */
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 25%);
    background-attachment: fixed;
    margin: 0;
    font-family: var(--font-main);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- HERO SECTION --- */
.hero-section {
    padding: 120px 20px 80px; 
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -0.03em;
    /* Dùng biến gradient để tự đổi màu theo theme */
    background: var(--hero-text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.25rem; 
    color: var(--text-muted);
    line-height: 1.6; 
    max-width: 680px;
    margin: 0 auto;
}

/* --- BENTO GRID (FEATURE CARDS) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 20px;
    max-width: 1100px; margin: 0 auto 80px; padding: 0 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: var(--card-shadow);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.15);
}

/* Gradient Card backgrounds adapted for theme */
.feature-card.large { 
    grid-column: span 2; 
    background: var(--card-gradient-large); 
}
.feature-card.tall { 
    grid-row: span 2; 
    background: var(--card-gradient-tall); 
}

.fc-icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 20px;
    background: var(--icon-bg);
    /* Icon color will be inline style in HTML or inherit */
}

.fc-title { 
    font-size: 1.4rem; 
    font-weight: 700; 
    color: var(--text-main); 
    margin-bottom: 10px; 
}
.fc-desc { 
    font-size: 0.95rem; 
    color: var(--text-muted); 
    line-height: 1.5; 
}
.fc-arrow { 
    margin-top: 20px; 
    color: var(--primary); 
    font-weight: 600; 
    opacity: 0; 
    transform: translateX(-10px); 
    transition: 0.3s; 
}

.feature-card:hover .fc-arrow { opacity: 1; transform: translateX(0); }

/* --- RECENT PUBLICATIONS SECTION --- */
.recent-section {
    max-width: 1100px; margin: 0 auto 100px; padding: 0 20px;
}
.section-header {
    display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px;
}
.sh-title { 
    font-size: 2rem; font-weight: 800; margin: 0; 
    color: var(--text-main);
}
.sh-link { 
    color: var(--primary); text-decoration: none; font-weight: 600; transition: 0.2s; 
}
.sh-link:hover { color: var(--text-main); }

.pub-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px;
}
.pub-mini-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px; padding: 25px;
    transition: 0.3s;
    box-shadow: var(--card-shadow);
}
.pub-mini-card:hover { 
    background: var(--bg-card-hover); 
    border-color: var(--primary); 
    transform: translateY(-3px);
}
.pm-year { 
    font-size: 0.8rem; font-weight: 700; color: var(--accent); 
    text-transform: uppercase; margin-bottom: 10px; display: block;
}
.pm-title { 
    font-size: 1.1rem; font-weight: 700; color: var(--text-main); 
    margin-bottom: 10px; line-height: 1.4; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pm-journal { 
    font-size: 0.9rem; color: var(--text-muted); font-style: italic; 
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-card.large, .feature-card.tall { grid-column: span 1; grid-row: span 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}