:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --primary: #38bdf8;
    --primary-glow: rgba(56, 189, 248, 0.5);
    --secondary: #818cf8;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(70, 89, 125, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(129, 140, 248, 0.15), transparent 25%);
    animation: pulseBg 15s ease-in-out infinite alternate;
}

@keyframes pulseBg {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

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

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.3);
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--text-main);
}

.name {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.thai-name {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
}

.title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary);
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.contact-info a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary);
}

/* Grid Layout */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Skills Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.tags span {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.2);
    transition: all 0.3s ease;
}

.tags span:hover {
    background: var(--primary);
    color: var(--bg-darker);
    box-shadow: 0 0 10px var(--primary-glow);
}

.skill-category {
    margin-bottom: 1.2rem;
}

.skill-category h4 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 0.3rem;
}

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

/* Lists and Items */
.item {
    margin-bottom: 1.5rem;
}

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

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.3rem;
}

.item-header h4 {
    font-size: 1.1rem;
    color: var(--text-main);
}

.date {
    font-size: 0.85rem;
    color: var(--primary);
    background: rgba(56, 189, 248, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    white-space: nowrap;
}

.institution {
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.list {
    list-style-type: none;
}

.list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.repo-link {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.repo-link:hover {
    background: var(--primary);
    color: var(--bg-darker);
}

.highlight {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--bg-darker);
    background-color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.soft-skills .skill-item {
    margin-bottom: 1rem;
}

.soft-skills .skill-item h4 {
    color: var(--secondary);
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.soft-skills .skill-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Animations */
.slide-in {
    animation: slideIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.fade-in {
    animation: fadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

@keyframes slideIn {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .name {
        font-size: 2rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .container {
        padding: 1rem;
    }
}