* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b35;
    --secondary: #ff8c00;
    --dark: #1a1a2e;
    --light: #f5f5f5;
    --accent: #00d4ff;
}

body {
    font-family: 'Poppins', 'Kanit', sans-serif;
    overflow: hidden;
    background: var(--dark);
    color: #fff;
    height: 100vh;
}

.container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.container::-webkit-scrollbar {
    width: 8px;
}

.container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.container::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.5);
    border-radius: 4px;
}

.container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.8);
}

.section {
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Layered 3D Shapes */
.layer-shape {
    position: absolute;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.geometric-shape {
    position: absolute;
    opacity: 0.15;
}

.circle-layer {
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary), transparent);
}

.triangle-layer {
    width: 0;
    height: 0;
    border-style: solid;
}

.square-layer {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    transform: rotate(45deg);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 0 50px;
    max-width: 1200px;
}

/* Morphing Shapes with 3D Effect */
.morph-shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 8s ease-in-out infinite;
    opacity: 0.15;
    filter: blur(100px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes morph {
    0%, 100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
        transform: translate(50px, -50px) rotate(90deg) scale(1.1);
    }
    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
        transform: translate(-50px, 50px) rotate(180deg) scale(0.9);
    }
    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
        transform: translate(50px, 50px) rotate(270deg) scale(1.05);
    }
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    top: -10%;
    left: -10%;
    animation-delay: 0s;
    z-index: 1;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    bottom: -10%;
    right: -10%;
    animation-delay: 2s;
    z-index: 2;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    top: 40%;
    right: 10%;
    animation-delay: 4s;
    z-index: 3;
}

/* Diagonal Cut Shapes */
.diagonal-shape {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.diagonal-shape::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 107, 53, 0.1) 50%, transparent 60%);
    transform: rotate(-15deg);
    animation: diagonalMove 20s linear infinite;
}

@keyframes diagonalMove {
    0% { transform: rotate(-15deg) translateX(-100%); }
    100% { transform: rotate(-15deg) translateX(100%); }
}

/* Floating Geometric Shapes */
.geo-shape {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(180deg); }
}

.geo-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.geo-square {
    width: 120px;
    height: 120px;
    border: 3px solid var(--accent);
    transform: rotate(45deg);
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid var(--secondary);
    opacity: 0.1;
    top: 60%;
    left: 10%;
    animation-delay: 4s;
}

/* Navigation Dots */
.nav-dots {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    margin: 15px 0;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.nav-dot.active {
    background: var(--primary);
    transform: scale(1.5);
    border-color: #fff;
}

.nav-dot:hover {
    background: var(--primary);
    transform: scale(1.3);
}

/* Section 1 - Hero */
#section1 {
    background: #000;
    position: relative;
}

#section1::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 140, 0, 0.1) 0%, transparent 50%);
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Grid Pattern */
.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}

/* Spotlight Effect */
.spotlight {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.3) 0%, transparent 70%);
    filter: blur(80px);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Hero Badges */
.hero-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeInUp 1s ease;
    animation-fill-mode: both;
}

.badge-item:nth-child(1) { animation-delay: 0.2s; }
.badge-item:nth-child(2) { animation-delay: 0.4s; }
.badge-item:nth-child(3) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

.badge-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow:
        0 0 0 1px rgba(255, 107, 53, 0.3),
        0 15px 40px rgba(255, 107, 53, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

.section.active h1 {
    opacity: 1;
    transform: translateY(0);
}

.subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 30px;
    color: #fff;
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease 0.2s;
}

.section.active .subtitle {
    opacity: 1;
    transform: translateY(0);
}

p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease 0.4s;
}

.section.active p {
    opacity: 1;
    transform: translateY(0);
}

.cta-btn {
    display: inline-block;
    padding: 16px 48px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease 0.6s;
    position: relative;
    overflow: hidden;
}

.cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.cta-btn span {
    position: relative;
    z-index: 1;
}

.cta-btn:hover::before {
    opacity: 1;
}

.section.active .cta-btn {
    opacity: 1;
    transform: translateY(0);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 20px 60px rgba(255, 107, 53, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Section 2 - About/Story */
#section2 {
    background: #000;
    position: relative;
}

#section2::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(255, 140, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(255, 107, 53, 0.15) 0%, transparent 50%);
}

.about-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.about-image-box {
    position: relative;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 1s ease;
}

.section.active .about-image-box {
    opacity: 1;
    transform: translateX(0);
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-height: 400px;
    object-fit: contain;
    background: transparent;
}

.about-text-box {
    opacity: 0;
    transform: translateX(50px);
    transition: all 1s ease 0.2s;
}

.section.active .about-text-box {
    opacity: 1;
    transform: translateX(0);
}

.section-label {
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.about-title {
    font-size: 2.5rem;
    margin-bottom: 25px;
    line-height: 1.2;
}

.about-desc {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.tech-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 30px;
}

.tech-list-item {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.tech-list-item i {
    color: var(--primary);
    margin-right: 10px;
    font-size: 0.8rem;
}

/* Section 3 - Skills with Water Fill */
#section3 {
    background: #000;
    position: relative;
}

#section3::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(255, 107, 53, 0.1) 0%, transparent 50%);
}

.skills-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.section.active .skills-intro {
    opacity: 1;
    transform: translateY(0);
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1000px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.section.active .skill-item:nth-child(1) { transition-delay: 0.1s; }
.section.active .skill-item:nth-child(2) { transition-delay: 0.2s; }
.section.active .skill-item:nth-child(3) { transition-delay: 0.3s; }
.section.active .skill-item:nth-child(4) { transition-delay: 0.4s; }
.section.active .skill-item:nth-child(5) { transition-delay: 0.5s; }
.section.active .skill-item:nth-child(6) { transition-delay: 0.6s; }
.section.active .skill-item:nth-child(7) { transition-delay: 0.7s; }
.section.active .skill-item:nth-child(8) { transition-delay: 0.8s; }

.section.active .skill-item {
    opacity: 1;
    transform: translateY(0);
}

.circle-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    margin-bottom: 20px;
}

.circle-outer {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.skill-item:hover .circle-outer {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.3);
}

.circle-inner {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.water-fill {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    background: linear-gradient(180deg,
        rgba(255, 165, 0, 0.8) 0%,
        rgba(255, 107, 53, 0.9) 50%,
        var(--secondary) 100%);
    transition: height 1.5s ease-out;
    height: 0;
    z-index: 1;
}

.water-fill::before,
.water-fill::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -150%;
    left: -50%;
    background: transparent;
    border-radius: 45%;
}

.water-fill::before {
    background: rgba(255, 255, 255, 0.15);
    animation: wave-rotate 8s linear infinite;
}

.water-fill::after {
    background: rgba(255, 255, 255, 0.1);
    animation: wave-rotate 10s linear infinite reverse;
}

@keyframes wave-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skill-icon {
    font-size: 2.5rem;
    color: #000000;
    position: relative;
    z-index: 2;
}

.skill-percentage {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #4CAF50;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.skill-name {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.skill-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Section 4 - Education Timeline */
#section4 {
    background: #000;
    position: relative;
}

#section4::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%);
}

.education-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1100px;
}

.education-section h3 {
    font-size: 2rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.section.active .education-section h3 {
    opacity: 1;
    transform: translateY(0);
}

.education-section h3 i {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 107, 53, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary);
    font-size: 1.5rem;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    padding-left: 60px;
    margin-bottom: 35px;
    position: relative;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.section.active .timeline-item:nth-child(1) { transition-delay: 0.2s; }
.section.active .timeline-item:nth-child(2) { transition-delay: 0.4s; }
.section.active .timeline-item:nth-child(3) { transition-delay: 0.6s; }
.section.active .timeline-item:nth-child(4) { transition-delay: 0.8s; }

.section.active .timeline-item {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 5px solid #000;
    z-index: 1;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
}

.timeline-date {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 600;
}

.timeline-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-subtitle {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.timeline-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Section 5 - Projects */
#section5 {
    background: #000;
    position: relative;
}

#section5::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(240, 147, 251, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(245, 87, 108, 0.15) 0%, transparent 50%);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--primary);
    border-radius: 25px;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.project-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.section.active .project-card:nth-child(1) { transition-delay: 0.2s; }
.section.active .project-card:nth-child(2) { transition-delay: 0.4s; }
.section.active .project-card:nth-child(3) { transition-delay: 0.6s; }

.section.active .project-card {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 70px rgba(255, 107, 53, 0.3);
}

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
}

.project-content {
    padding: 30px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.project-tag {
    padding: 5px 12px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.project-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.project-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Section 6 - Certifications */
#section6 {
    background: #000;
    position: relative;
}

#section6::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 50%);
}

.cert-section-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    font-weight: 600;
}

/* Scrolling Certificates Section */
.cert-scroll-section {
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.section.active .cert-scroll-section {
    opacity: 1;
    transform: translateY(0);
}

.cert-scroll-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent,
        black 10%,
        black 90%,
        transparent
    );
}

.cert-scroll-track {
    display: flex;
    gap: 30px;
    animation: scrollCerts 30s linear infinite;
    width: fit-content;
}

.cert-scroll-track:hover {
    animation-play-state: paused;
}

@keyframes scrollCerts {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.cert-scroll-item {
    flex-shrink: 0;
    width: 500px;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.cert-scroll-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

.cert-scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: rgba(255, 255, 255, 0.02);
}

/* Main Certifications */
.main-certs-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease 0.3s;
}

.section.active .main-certs-section {
    opacity: 1;
    transform: translateY(0);
}

.main-certs-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.main-cert-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.main-cert-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.5);
}

.main-cert-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.main-cert-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
    background: rgba(255, 255, 255, 0.02);
}

.main-cert-card:hover .main-cert-image img {
    transform: scale(1.1);
}

.main-cert-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.5);
}

.main-cert-badge.toeic {
    background: linear-gradient(135deg, #4169e1, #1e90ff);
    color: #fff;
}

.main-cert-info {
    padding: 25px;
    text-align: center;
}

.main-cert-info h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.main-cert-info p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Section 7 - Contact */
#section7 {
    background: #000;
    position: relative;
}

#section7::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 50%);
}

.contact-box {
    max-width: 600px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 1s ease;
}

.section.active .contact-box {
    opacity: 1;
    transform: scale(1);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.social-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    transition: all 0.3s;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
    z-index: 100;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Hide scroll hint on last section */
#section7 .scroll-hint {
    display: none;
}

/* Image Lightbox Modal */
.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.image-lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-image {
    max-width: 100%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lightbox-close:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.lightbox-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.cert-scroll-item {
    cursor: pointer;
}

.main-cert-image {
    cursor: pointer;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

/* Responsive */
/* iPad Pro and larger tablets */
@media (max-width: 1024px) {
    /* ปิด scroll snap ใน iPad */
    .container {
        scroll-snap-type: none;
    }

    .section {
        min-height: 100vh;
        height: auto;
        padding: 80px 0;
        scroll-snap-align: none;
    }

    #section1 {
        min-height: 100vh;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .content {
        padding: 0 40px;
    }

    h1 {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.8rem;
    }

    p {
        font-size: 1.1rem;
    }

    .about-content-wrapper,
    .education-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image-box {
        order: -1;
    }

    .projects-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 25px;
    }

    .project-link {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    .certifications-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .skills-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    /* แก้ไข Section 6 สำหรับ iPad */
    #section6 .content {
        max-width: 100%;
        padding: 0 40px;
    }

    #section6 h1 {
        font-size: 2.5rem;
    }

    #section6 p {
        font-size: 1.1rem;
    }

    .cert-scroll-item {
        width: 400px;
    }

    .main-certs-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        max-width: calc(100% - 80px);
        margin: 0 auto;
    }

    .main-cert-card {
        max-width: 100%;
        overflow: hidden;
    }

    .main-cert-image {
        width: 100%;
        overflow: hidden;
    }

    .main-cert-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .main-cert-info {
        padding: 20px 15px;
    }

    .cert-section-title {
        font-size: 1.4rem;
    }

    /* ซ่อน nav dots ใน iPad */
    .nav-dots {
        display: none;
    }

    /* ปรับ badge */
    .hero-badges {
        gap: 15px;
    }

    .badge-item {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    /* ปรับ about image */
    .about-img {
        min-height: 350px;
    }

    /* ปรับ timeline */
    .timeline-item {
        padding-left: 55px;
    }

    /* ปรับ project cards */
    .project-content {
        padding: 25px;
    }

    .project-title {
        font-size: 1.3rem;
    }
}

/* iPad and smaller tablets */
@media (max-width: 768px) {
    .container {
        scroll-snap-type: none;
    }

    .section {
        min-height: 100vh;
        height: auto;
        padding: 80px 0;
        scroll-snap-align: none;
    }

    #section1 {
        min-height: 100vh;
        padding: 0;
    }

    .content {
        padding: 0 20px;
    }

    h1 {
        font-size: 2.5rem;
    }

    p {
        font-size: 1rem;
    }

    .nav-dots {
        right: 15px;
    }

    .nav-dot {
        width: 10px;
        height: 10px;
        margin: 12px 0;
    }

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .projects-container {
        grid-template-columns: 1fr !important;
        gap: 25px;
    }

    .main-certs-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .cert-scroll-item {
        width: 450px;
    }

    .cert-scroll-track {
        gap: 20px;
    }

    .education-grid {
        gap: 40px;
    }

    .circle-wrap {
        width: 110px;
        height: 110px;
    }

    .circle-outer {
        width: 110px;
        height: 110px;
    }

    .circle-inner {
        width: 80px;
        height: 80px;
    }

    .hero-badges {
        gap: 15px;
    }

    .badge-item {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .about-img {
        min-height: 300px !important;
    }

    .project-link {
        font-size: 0.8rem;
        padding: 8px 14px;
    }

    .cert-scroll-item {
        width: 380px;
    }

    .cert-scroll-section h3 {
        font-size: 1.3rem;
    }

    .main-certs-section h3 {
        font-size: 1.3rem;
    }

    .main-cert-info {
        padding: 20px;
    }

    .main-cert-info h4 {
        font-size: 1.1rem;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .section {
        min-height: 100vh;
        height: auto;
        padding: 60px 0 40px;
    }

    #section1 {
        min-height: 100vh;
        padding: 0;
        display: flex;
        align-items: center;
    }

    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .skills-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .circle-wrap {
        width: 100px;
        height: 100px;
    }

    .circle-outer {
        width: 100px;
        height: 100px;
        padding: 12px;
    }

    .circle-inner {
        width: 76px;
        height: 76px;
    }

    .skill-icon {
        font-size: 2rem;
    }

    .skill-percentage {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }

    .skill-name {
        font-size: 1rem;
    }

    .skill-desc {
        font-size: 0.75rem;
    }

    .nav-dots {
        display: none;
    }

    /* บังคับให้ทุก section แสดงผลในมือถือ */
    .section h1,
    .section h2,
    .section h3,
    .section p,
    .section .content {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    /* แก้ไข Section 4 - Education */
    #section4 h1,
    #section4 p,
    #section4 .education-section h3,
    #section4 .timeline-item {
        opacity: 1 !important;
        transform: translateX(0) !important;
        transform: translateY(0) !important;
    }

    /* แก้ไข Section 5 - Projects */
    #section5 h1,
    #section5 p,
    #section5 .project-card {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .hero-badges {
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .badge-item {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .badge-item i {
        font-size: 1rem;
    }

    .cta-btn {
        padding: 12px 30px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 280px;
    }

    .about-img {
        min-height: 250px !important;
    }

    .about-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .about-desc {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .section-label {
        font-size: 0.8rem;
    }

    .tech-list {
        grid-template-columns: 1fr;
    }

    .timeline-title {
        font-size: 1.05rem;
    }

    .timeline-subtitle {
        font-size: 0.9rem;
    }

    .timeline-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .timeline-item {
        padding-left: 50px;
        margin-bottom: 25px;
    }

    .project-card {
        border-radius: 20px;
    }

    .project-title {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .project-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .project-tags {
        gap: 6px;
    }

    .project-tag {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .cert-scroll-item {
        width: 300px;
    }

    .cert-scroll-track {
        gap: 20px;
    }

    .cert-section-title {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .main-cert-info {
        padding: 18px;
    }

    .main-cert-info h4 {
        font-size: 1rem;
        line-height: 1.3;
    }

    .main-cert-info p {
        font-size: 0.8rem;
    }

    .main-cert-badge {
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    /* แก้ไข Section 6 ให้แสดงผลดีในมือถือ */
    #section6 h1 {
        font-size: 1.8rem !important;
        margin-bottom: 15px;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    #section6 p {
        font-size: 0.9rem !important;
        margin-bottom: 25px;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    #section6 .content {
        padding: 0 20px;
        max-width: 100% !important;
    }

    #section6 .cert-scroll-section,
    #section6 .main-certs-section {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    #section6 .cert-section-title {
        opacity: 1 !important;
        display: block !important;
    }

    .social-icons {
        gap: 15px;
    }

    .social-icons {
        gap: 12px;
        flex-wrap: wrap;
    }

    .social-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .contact-box h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .contact-box p {
        font-size: 0.9rem;
    }
}

/* Small mobile phones */
@media (max-width: 375px) {
    .section {
        padding: 50px 0 30px;
    }

    h1 {
        font-size: 1.7rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .content {
        padding: 0 15px;
    }

    .skills-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .circle-wrap {
        width: 130px;
        height: 130px;
    }

    .circle-outer {
        width: 130px;
        height: 130px;
    }

    .circle-inner {
        width: 100px;
        height: 100px;
    }

    .badge-item {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}


