:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #1e293b;
    --accent: #0ea5e9;
    --card-bg: rgba(30, 41, 59, 0.7);
    --nav-bg: rgba(15, 23, 42, 0.85);
    
    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Kanit', sans-serif;
    --font-en: 'Poppins', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

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

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: #0b1120;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.highlight {
    color: var(--accent);
    background: linear-gradient(to right, #3b82f6, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--font-heading);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

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

.btn-secondary:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

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

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
}

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

.nav-links li a {
    font-weight: 400;
    color: var(--text-muted);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--text-main);
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: rgba(59, 130, 246, 0.2);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(14, 165, 233, 0.2);
    bottom: -100px;
    left: -100px;
}

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

.hero-text {
    flex: 1;
}

.greeting {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.name {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

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

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

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

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

.profile-frame {
    position: relative;
    width: 350px;
    height: 350px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(14, 165, 233, 0.5));
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    margin: 1rem auto 0;
    border-radius: 2px;
}

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

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 20px;
}

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

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    left: 13px;
    top: 5px;
    box-shadow: 0 0 0 4px var(--bg-color), 0 0 0 8px rgba(14, 165, 233, 0.2);
}

.timeline-content {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(14, 165, 233, 0.3);
}

.timeline-year {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.degree {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.major {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 400;
}

.university {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.university i {
    color: var(--accent);
    font-size: 1.2rem;
}

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

.skill-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 41, 59, 0.9);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(14, 165, 233, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 2.5rem;
    transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    transform: scale(1.1);
}

.skill-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: var(--font-en);
}

.skill-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.research-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.research-card:hover {
    transform: translateX(10px);
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.research-year {
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    min-width: 120px;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.research-content {
    padding: 2rem;
    flex: 1;
}

.research-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    color: var(--text-main);
}

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

.research-authors strong {
    color: var(--accent);
}

.research-journal {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
}

.research-journal i {
    color: var(--primary);
    font-size: 1.2rem;
    margin-top: 2px;
}

/* Footer */
.footer {
    background: #080c16;
    padding: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
}

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

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

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 3rem;
    }
    
    .description {
        margin: 0 auto 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .profile-frame {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--nav-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: left 0.3s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .name {
        font-size: 3rem;
    }
    
    .research-card {
        flex-direction: column;
    }
    
    .research-year {
        writing-mode: horizontal-tb;
        transform: none;
        padding: 1rem;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .profile-frame {
        width: 250px;
        height: 250px;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .research-content {
        padding: 1.5rem;
    }
}
