/* --- Global Variables & Reset --- */
:root {
    --font-primary: 'Inter', 'Noto Sans Thai', sans-serif;
    --bg-body: #f8fafc;
    /* Theme: Deep Orange */
    --primary-color: #f97316; 
    --primary-dark: #ea580c;
    --primary-light: #ffedd5;
    --text-color: #334155;
    --header-color: #0f172a;
    --card-bg: #ffffff;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}


body {
    background-color: var(--bg-body);
    font-family: var(--font-primary);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn, .nav-link {
    font-family: var(--font-primary) !important;
    font-weight: 700;
}

a { text-decoration: none; }

/* --- Navbar --- */
.navbar {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    padding: 0.8rem 0;
}
.nav-link { color: var(--header-color); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; margin: 0 0.5rem; }
.nav-link:hover { color: var(--primary-color); }
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}
.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    /* ลบลิงก์เดิมออก แล้วใส่ลิงก์รูปใหม่ หรือ ชื่อไฟล์ที่คุณอัปโหลดเข้าไป */
    background-image: url('cover.jpg'); /* กรณีอัปโหลดไฟล์ชื่อ bg-cover.jpg ไว้ที่เดียวกับ index.html */
    
    
    background-size: cover;
    background-position: center;

    padding: 120px 0 80px 0;
    color: white;
    margin-bottom: 4rem;
    text-align: center;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.98));
}
.hero-content { position: relative; z-index: 2; }

.profile-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.5);
    margin-bottom: 1.5rem;
    object-fit: cover;
    background-color: #fff;
    transition: transform 0.3s;
}
.profile-avatar:hover { transform: scale(1.05) rotate(2deg); }

/* --- Cards & General Components --- */
.section-title {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 1.5rem;
    color: var(--header-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
}
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* --- Project Highlights --- */
.project-card {
    border-top: 4px solid var(--primary-color);
}

/* --- Current Work Cards (New) --- */
.work-card {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    transition: all 0.2s;
    height: 100%;
}
.work-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* --- Education Strip (New) --- */
.edu-strip {
    background-color: #f1f5f9;
    border-radius: 8px;
    border-left: 4px solid #cbd5e1;
}

/* --- Liquipedia Button (New) --- */
.btn-liquipedia {
    background-color: #242e38;
    color: white;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.btn-liquipedia:hover {
    background-color: #3b4b5b;
    color: white;
    transform: translateY(-2px);
}

/* --- Scrollable Lists --- */
.scrollable-card-body {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}
.scrollable-card-body::-webkit-scrollbar { width: 6px; }
.scrollable-card-body::-webkit-scrollbar-track { background: #f1f5f9; }
.scrollable-card-body::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
.scrollable-card-body::-webkit-scrollbar-thumb:hover { background-color: var(--primary-color); }

.list-group-item {
    border: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem;
    transition: background 0.2s;
}
.list-group-item:hover { background-color: #fff7ed; }
.list-group-item:last-child { border-bottom: none; }

/* --- Social Grid --- */
.social-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.2s;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.social-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
    color: var(--primary-color);
}
.social-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.music-card {
    /* พื้นหลังสีเข้มไล่ระดับ ดู Artist */
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.ls-1 {
    letter-spacing: 1px;
}


/* Animation จุดสีเขียวกระพริบ */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}
.animate-pulse {
    animation: pulse-green 2s infinite;
    border-radius: 50%;
}

/* Effect ปุ่มเด้งดึ๋ง */
.hover-up {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hover-up:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08) !important;
    border-color: var(--primary-color) !important; /* เปลี่ยนขอบเป็นสีส้มธีมหลัก */
}

.hover-up-sm {
    transition: transform 0.2s, background-color 0.2s;
    cursor: pointer;
}
.hover-up-sm:hover {
    transform: translateY(-2px);
    background-color: #e2e8f0 !important; /* สีเทาเข้มขึ้นนิดนึงตอนชี้ */
    color: var(--primary-color) !important;
}

/* --- Page Loader --- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}
.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(249, 115, 22, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Statistics Counter --- */
.stats-section {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 2rem;
}
.stat-card {
    text-align: center;
    padding: 1.5rem;
}
.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--header-color);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* --- Footer --- */
footer { background-color: #0f172a; color: #94a3b8; font-size: 0.9rem; }