:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary-color: #8b5cf6;
    --secondary-color: #3b82f6;
    --accent-color: #ec4899;
    --card-bg: rgba(30, 41, 59, 0.7);
    --nav-bg: rgba(15, 23, 42, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Sarabun', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Blobs for Modern Aesthetic */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    border-radius: 50%;
    animation: float 10s infinite ease-in-out alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary-color), transparent 70%);
}

.blob-2 {
    top: 40%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary-color), transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-family: var(--font-body);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px; /* Offset for navbar */
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.greeting {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-family: var(--font-body);
}

.name {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.title {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    font-weight: 300;
}

.bio {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.btn-outline {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-color);
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image-border {
    position: relative;
    width: 350px;
    height: 450px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 5px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 30px; }
    50% { border-radius: 60px 30px 60px 30px; }
    100% { border-radius: 30px; }
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    background-color: var(--bg-color);
}

/* Timeline (Education) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--border-color);
    top: 0;
    bottom: 0;
    left: 20px;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.timeline-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    border-color: var(--primary-color);
}

.timeline-year {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-color);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-degree {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-major {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.timeline-uni {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Teaching / Cards */
.bg-glass {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Publications */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.publication-item {
    display: flex;
    gap: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.publication-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--accent-color);
}

.pub-year {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px var(--border-color);
    min-width: 80px;
}

.publication-item:hover .pub-year {
    -webkit-text-stroke: 1px var(--accent-color);
}

.pub-content {
    flex: 1;
}

.pub-title {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.pub-authors {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.pub-journal {
    font-size: 0.9rem;
    color: var(--secondary-color);
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--nav-bg);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-container p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .bio {
        margin: 0 auto 2.5rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none; /* Hide on mobile by default */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 2rem;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .hamburger {
        display: block;
    }
    
    .publication-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pub-year {
        font-size: 1.5rem;
        -webkit-text-stroke: 1px var(--primary-color);
    }
    
    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
