/* --- Variables & Reset --- */
:root {
    --primary: #00A8FF;
    --primary-dark: #0077b6;
    --bg-body: #0f172a; /* Dark Slate Blue */
    --bg-card: #1e293b; /* Lighter Slate */
    --bg-darker: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --font-main: 'Sarabun', sans-serif;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    cursor: none; /* Custom cursor */
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- Custom Cursor --- */
.cursor-dot, .cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
}
.cursor-dot { width: 8px; height: 8px; background: var(--primary); }
.cursor-outline {
    width: 40px; height: 40px;
    border: 2px solid var(--primary);
    opacity: 0.5;
    transition: transform 0.1s ease-out;
}
body:hover .cursor-outline { opacity: 1; }

/* --- Layout: Resume Container --- */
.resume-container {
    max-width: 1000px;
    margin: 40px auto;
    background: var(--bg-darker);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* --- Header Section --- */
.resume-header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%), 
                url('https://img2.pic.in.th/pic/External_background746a0876f66dc0b0.png');
    background-size: cover;
    background-position: center;
    padding: 3rem 2rem;
    border-bottom: 1px solid var(--border);
}

.profile-section {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.profile-image-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    border: 3px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0, 168, 255, 0.3);
}

.status-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.profile-info h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    line-height: 1.2;
}

.profile-info .role {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.profile-info .bio {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 600px;
}

.contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-item:hover {
    background: rgba(0, 168, 255, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

/* --- Grid Layout --- */
.resume-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 800px;
}

/* --- Sidebar (Left) --- */
.resume-sidebar {
    background: var(--bg-card);
    padding: 2rem;
    border-right: 1px solid var(--border);
}

.sidebar-box { margin-bottom: 2.5rem; }

.sidebar-box h3 {
    font-size: 1.2rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.info-list li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.info-list strong { color: var(--text-main); }

.skill-category { margin-bottom: 1.5rem; }
.skill-category h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(0, 168, 255, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 168, 255, 0.2);
}

/* --- Content (Right) --- */
.resume-content {
    padding: 2.5rem;
}

.content-section { margin-bottom: 3rem; }

.section-head {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-head i { color: var(--primary); }

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 20px;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 5px;
    width: 14px;
    height: 14px;
    background: var(--bg-body);
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
}

.timeline-content h3 { font-size: 1.1rem; color: var(--text-main); }
.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    background: rgba(0, 168, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 5px 0 10px;
}
.timeline-content p { font-size: 0.95rem; color: var(--text-muted); }

/* Portfolio Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.project-card:hover { transform: translateY(-5px); border-color: var(--primary); }

.project-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.project-info { padding: 10px; }
.project-info h4 { font-size: 1rem; margin-bottom: 5px; }
.project-info p { font-size: 0.8rem; color: var(--text-muted); }

/* Video Compact List */
.video-list-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.video-row {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.video-row:hover {
    background: rgba(0, 168, 255, 0.05);
    border-color: var(--primary);
}

.video-icon {
    font-size: 1.5rem;
    color: #ff0000; /* YouTube Red */
}

.video-details h5 { font-size: 1rem; margin-bottom: 0; }
.video-details span { font-size: 0.8rem; color: var(--text-muted); }

.text-right { text-align: right; }
.mt-2 { margin-top: 1rem; }
.btn-link {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
}
.btn-link:hover { text-decoration: underline; }

/* Footer */
.resume-footer {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Animations */
.section-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}
.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .resume-container { margin: 0; border-radius: 0; border: none; }
    .resume-grid { grid-template-columns: 1fr; }
    .resume-sidebar { border-right: none; border-bottom: 1px solid var(--border); }
    .profile-section { flex-direction: column; text-align: center; }
    .contact-bar { justify-content: center; }
    .timeline { border-left: none; padding-left: 0; }
    .timeline-item { padding-left: 0; border-left: 2px solid var(--border); padding-left: 20px; margin-left: 10px; }
    .cursor-dot, .cursor-outline { display: none; } /* Disable custom cursor on mobile */
}