* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #818181;
    --secondary-color: #d1d1d1;
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #b8b8d1;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    z-index: -1;
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    top: -100%;
    left: -100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 169, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(110, 193, 228, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite alternate;
    /* เพิ่ม alternate เพื่อการเคลื่อนไหวที่นุ่มนวล */
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(-60px, -100px) rotate(120deg);
    }

    66% {
        transform: translate(100px, 40px) rotate(240deg);
    }
}

.neural-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: #000000;
    animation: backgroundPulse 14s ease-in-out infinite;
}
@keyframes backgroundPulse {
    0%, 100% {
        filter: brightness(0.9) saturate(1.4) hue-rotate(0deg);
    }
    33% {
        filter: brightness(1.1) saturate(1.7) hue-rotate(15deg);
    }
    66% {
        filter: brightness(1.0) saturate(1.5) hue-rotate(-10deg);
    }
}
/* Floating geometric shapes */
.geometric-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}
.shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: floatShape 20s linear infinite;
}
.shape:nth-child(1) {
    width: 100px;
    height: 100px;
    left: 10%;
    animation-delay: 0s;
    border-color: rgba(255, 255, 255, 0.4);
}
.shape:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 70%;
    animation-delay: -5s;
    border-radius: 50%;
    border-color: rgba(255, 255, 255, 0.4);
}
.shape:nth-child(3) {
    width: 80px;
    height: 80px;
    left: 30%;
    animation-delay: -10s;
    transform: rotate(45deg);
    border-color: rgba(255, 255, 255, 0.4);
}
.shape:nth-child(4) {
    width: 120px;
    height: 120px;
    left: 50%;
    animation-delay: -15s;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
}
@keyframes floatShape {
    from {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    to {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}
/* Neural network lines */
.neural-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.neural-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    height: 1px;
    animation: neuralPulse 3s ease-in-out infinite;
}
.neural-line:nth-child(1) {
    top: 20%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    animation-delay: 0s;
}
.neural-line:nth-child(2) {
    top: 60%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    animation-delay: -1s;
}
.neural-line:nth-child(3) {
    top: 40%;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    animation-delay: -2s;
}
@keyframes neuralPulse {
    0%, 100% {
        opacity: 0.2;
        transform: scaleX(0.5);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

.main-content {
    display: block;
    margin-top: 50px;
    min-height: 100vh;
    padding: 0;
}

.resume-title {
    margin: 40px;
    display: flex;
    justify-content: center;
}

.resume-name {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-container {
    margin: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-card {
    display: flex;
    flex-direction: column;
    height: 700px auto;
    width: 600px auto;
    min-width: 400px;
    margin: 40px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease;
    justify-content: center;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.profile-img {
    display: block;
    margin: 20px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
    padding: 5px;
    box-sizing: border-box;
}

.profile-name {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.profile-username {
    color: var(--text-secondary);
    font-size: 32px;
    margin: 5px 0px 5px 20px;
}

.rgb-gradient-divider {
    height: 3px;
    border: none;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 500px auto;
    margin: 20px 0px 20px 0px;
    border-radius: 3px;
}

.skill-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px;
}

.content-section {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    animation: slideUp 0.6s ease;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

}

.title-icon {
    font-size: 28px;
    animation: bounce 2s ease infinite;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.skill-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px;

}

.skill-grid {
    width: 40%;
    min-width: 400px;
    height: auto;
    background: var(--bg-card);
    border-radius: 24px;
    margin: 5px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skill-icon-img {
    width: 75px;
}

.skill-text {
    font-size: 24px;
}

.contact-list {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px;
}

.contact-grid {
    width: 35%;
    min-width: auto;
    height: auto;
    background: var(--bg-card);
    border-radius: 12px;
    margin: 10px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

.contact-icon-img {
    width: 25px;
}


.contact-text-container {
    display: flex;
    flex-direction: column;
    align-items: end;
}

.contact-text {
    font-size: 20px;
    color: #ffffff;
}

.contact-text-detail {
    font-size: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px;
}


.social-grid {
    width: 35%;
    min-width: auto;
    height: auto;
    background: var(--bg-card);
    border-radius: 12px;
    margin: 10px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
}

.social-grid:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px #d7d7d7cc, 0 0 60px #6ec1e440;
    background: rgba(40, 30, 40, 0.94);
    transform: scale(1.05);
    transition: 0.5s;
}

.footer {
    width: 100%;
    margin-top: 80px;
    padding: 40px 20px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--card-shadow);
    text-align: center;
}

.footer p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    font-style: italic;
}

.instagram-card:hover .ig-white {
    display: none;
}
.instagram-card:hover .ig-gradient {
    display: inline-block !important;
}

.ig-white, .ig-gradient {
    transition: opacity 0.3s ease-in-out;
}

.steam-white, .steam-gradient {
    transition: opacity 0.3s ease-in-out;
}

.steam-card .steam-gradient {
    opacity: 0;
    display: inline-block !important;
    position: absolute;
}

.steam-card:hover .steam-white {
    opacity: 0;
}

.steam-card:hover .steam-gradient {
    opacity: 1;
}

.social-grid:has(.bi-discord):hover svg {
    fill: #5865F2;
    transition: 0.3s ease;
}

.roblox-white, .roblox-gradient {
    transition: opacity 0.3s ease-in-out;
}

.roblox-card .roblox-gradient {
    opacity: 0;
    display: inline-block !important;
    position: absolute;
}

.roblox-card:hover .roblox-white {
    opacity: 0;
}

.roblox-card:hover .roblox-gradient {
    opacity: 1;
}

.social-grid:has(.bi-spotify):hover svg {
    fill: #1DB954;
    transition: 0.3s ease;
}

@media screen and (max-width: 768px) {
    .resume-name {
        font-size: 32px;
        text-align: center;
        padding: 0 10px;
    }

    .social-grid {
        width: 90% !important;
        min-width: unset !important;
        margin: 8px auto;
    }

    .footer {
        width: 100%;
        padding: 20px 15px;
        margin-top: 40px;
    }

    .footer p {
        font-size: 14px;
        padding: 0 5px;
    }
}