/*

TemplateMo 593 personal shape

https://templatemo.com/tm-593-personal-shape

*/

@charset "utf-8";
/* CSS Document */

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

        /* Footer */
        .footer {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
            color: var(--text-light);
            padding: 3rem 0 2rem;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
        }

        .footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-grid" width="12" height="12" patternUnits="userSpaceOnUse"><path d="M 12 0 L 0 0 0 12" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23footer-grid)"/></svg>');
            opacity: 0.4;
        }

        .footer::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
        }

        .footer-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
            position: relative;
            z-index: 2;
        }

        .footer-left p {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.9rem;
            margin: 0;
        }

        .footer-right {
            display: flex;
            gap: 2rem;
            flex-wrap: wrap;
        }

        .footer-right a {
            color: rgba(255, 255, 255, 0.7);
            text-decoration: none;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            position: relative;
        }

        .footer-right a:hover {
            color: var(--text-light);
            transform: translateY(-1px);
        }

        .footer-right a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 1px;
            bottom: -3px;
            left: 0;
            background: var(--primary-color);
            transition: width 0.3s ease;
        }

        .footer-right a:hover::after {
            width: 100%;
        }

        /* Footer Mobile Responsiveness */
        @media (max-width: 768px) {
            .footer-content {
                flex-direction: column;
                text-align: center;
                gap: 1.5rem;
            }

            .footer-right {
                justify-content: center;
                gap: 1.5rem;
            }

            .footer-right a {
                font-size: 0.85rem;
            }
        }

        @media (max-width: 480px) {
            .footer-right {
                flex-direction: column;
                gap: 1rem;
            }
        }

        :root {
            --primary-color: #6366f1;
            --secondary-color: #8b5cf6;
            --accent-color: #f59e0b;
            --accent-pink: #ec4899;
            --accent-cyan: #06b6d4;
            --text-primary: #0f172a;
            --text-secondary: #64748b;
            --text-light: #ffffff;
            --bg-primary: #ffffff;
            --bg-secondary: #f8fafc;
            --bg-dark: #0f172a;
            --bg-card: rgba(255, 255, 255, 0.95);
            --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            --gradient-tertiary: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            --gradient-elegant: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            --glass: rgba(255, 255, 255, 0.15);
            --glass-border: rgba(255, 255, 255, 0.2);
        }

        body {
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
            line-height: 1.7;
            color: var(--text-primary);
            scroll-behavior: smooth;
            overflow-x: hidden;
            background: var(--bg-primary);
        }

        /* Navigation */
        nav {
            position: fixed;
            top: 0;
            width: 100%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(20px);
            z-index: 1000;
            padding: 1rem 0;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        nav.scrolled {
            background: rgba(255, 255, 255, 0.98);
            box-shadow: var(--shadow-lg);
            padding: 0.75rem 0;
        }

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

        .logo {
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
            font-size: 1.75rem;
            font-weight: 700;
            background: var(--gradient-elegant);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: -0.5px;
        }

        .nav-links {
            display: flex;
            list-style: none;
            gap: 2.5rem;
            align-items: center;
        }

        .nav-links a {
            text-decoration: none;
            color: var(--text-primary);
            font-weight: 500;
            font-size: 0.95rem;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            padding: 0.5rem 0;
        }

        .nav-links a:hover {
            color: var(--primary-color);
            transform: translateY(-1px);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            bottom: 0;
            left: 50%;
            background: var(--gradient-primary);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform: translateX(-50%);
            border-radius: 1px;
        }

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

        /* Mobile Menu */
        .mobile-menu-toggle {
            display: none;
            flex-direction: column;
            cursor: pointer;
            padding: 0.5rem;
            z-index: 1001;
        }

        .hamburger {
            width: 25px;
            height: 3px;
            background: var(--text-primary);
            margin: 3px 0;
            transition: all 0.3s ease;
            border-radius: 1px;
        }

        .mobile-menu-toggle.active .hamburger:nth-child(1) {
            transform: rotate(-45deg) translate(-5px, 6px);
        }

        .mobile-menu-toggle.active .hamburger:nth-child(2) {
            opacity: 0;
        }

        .mobile-menu-toggle.active .hamburger:nth-child(3) {
            transform: rotate(45deg) translate(-5px, -6px);
        }

        .mobile-menu {
            position: fixed;
            top: 0;
            right: -100%;
            width: 100%;
            height: 100vh;
            background: rgba(15, 23, 42, 0.98);
            backdrop-filter: blur(20px);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 999;
        }

        .mobile-menu.active {
            right: 0;
        }

        .mobile-nav-links {
            list-style: none;
            text-align: center;
        }

        .mobile-nav-links li {
            margin: 2rem 0;
            opacity: 0;
            transform: translateY(30px);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .mobile-menu.active .mobile-nav-links li {
            opacity: 1;
            transform: translateY(0);
        }

        .mobile-menu.active .mobile-nav-links li:nth-child(1) { transition-delay: 0.1s; }
        .mobile-menu.active .mobile-nav-links li:nth-child(2) { transition-delay: 0.2s; }
        .mobile-menu.active .mobile-nav-links li:nth-child(3) { transition-delay: 0.3s; }
        .mobile-menu.active .mobile-nav-links li:nth-child(4) { transition-delay: 0.4s; }

        .mobile-nav-links a {
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
            font-size: 2.5rem;
            font-weight: 500;
            color: var(--text-light);
            text-decoration: none;
            transition: all 0.3s ease;
            background: var(--gradient-elegant);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .mobile-nav-links a:hover {
            transform: scale(1.05);
        }

        /* Hero Section */
        .hero {
            height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--gradient-elegant);
            position: relative;
            overflow: hidden;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
            animation: float 25s ease-in-out infinite;
            opacity: 0.7;
        }

        .hero::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
            animation: pulse 4s ease-in-out infinite alternate;
        }

        /* Floating Shapes */
        .floating-shapes {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        .shape {
            position: absolute;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
        }

        .shape-1 {
            width: 80px;
            height: 80px;
            top: 20%;
            left: 10%;
            animation: floatShape1 20s ease-in-out infinite;
        }

        .shape-2 {
            width: 120px;
            height: 120px;
            top: 60%;
            right: 15%;
            background: rgba(255, 255, 255, 0.08);
            animation: floatShape2 25s ease-in-out infinite reverse;
        }

        .shape-3 {
            width: 60px;
            height: 60px;
            top: 30%;
            right: 25%;
            background: rgba(255, 255, 255, 0.12);
            animation: floatShape3 18s ease-in-out infinite;
        }

        .shape-4 {
            width: 100px;
            height: 100px;
            bottom: 25%;
            left: 20%;
            background: rgba(255, 255, 255, 0.06);
            border-radius: 20px;
            animation: floatShape4 22s ease-in-out infinite;
        }

        .shape-5 {
            width: 40px;
            height: 40px;
            top: 15%;
            right: 40%;
            background: rgba(255, 255, 255, 0.15);
            animation: floatShape5 16s ease-in-out infinite reverse;
        }

        .shape-6 {
            width: 140px;
            height: 140px;
            bottom: 15%;
            right: 10%;
            background: rgba(255, 255, 255, 0.04);
            border-radius: 30px;
            animation: floatShape6 28s ease-in-out infinite;
        }

        @keyframes floatShape1 {
            0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            25% { transform: translateY(-30px) translateX(20px) rotate(90deg); }
            50% { transform: translateY(-15px) translateX(-10px) rotate(180deg); }
            75% { transform: translateY(-40px) translateX(15px) rotate(270deg); }
        }

        @keyframes floatShape2 {
            0%, 100% { transform: translateY(0px) translateX(0px) scale(1); }
            33% { transform: translateY(25px) translateX(-20px) scale(1.1); }
            66% { transform: translateY(-20px) translateX(25px) scale(0.9); }
        }

        @keyframes floatShape3 {
            0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            50% { transform: translateY(-25px) translateX(-30px) rotate(180deg); }
        }

        @keyframes floatShape4 {
            0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            25% { transform: translateY(20px) translateX(-15px) rotate(45deg); }
            50% { transform: translateY(-10px) translateX(30px) rotate(90deg); }
            75% { transform: translateY(15px) translateX(-20px) rotate(135deg); }
        }

        @keyframes floatShape5 {
            0%, 100% { transform: translateY(0px) translateX(0px) scale(1); }
            50% { transform: translateY(-35px) translateX(20px) scale(1.2); }
        }

        @keyframes floatShape6 {
            0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            33% { transform: translateY(-15px) translateX(10px) rotate(60deg); }
            66% { transform: translateY(10px) translateX(-25px) rotate(120deg); }
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(1deg); }
        }

        @keyframes pulse {
            0% { opacity: 0.5; }
            100% { opacity: 0.8; }
        }

        .hero-content {
            text-align: center;
            color: var(--text-light);
            z-index: 2;
            position: relative;
            max-width: 900px;
            padding: 0 2rem;
        }

        .hero-subtitle {
            font-size: 1.1rem;
            font-weight: 500;
            letter-spacing: 2px;
            text-transform: uppercase;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 1s ease 0.2s forwards;
            margin-bottom: 1rem;
            color: rgba(255, 255, 255, 0.8);
        }

        .hero h1 {
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
            font-size: 5rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 1s ease 0.4s forwards;
            line-height: 1.1;
            letter-spacing: -1px;
        }

        .hero .subtitle {
            font-size: 1.3rem;
            margin-bottom: 3rem;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 1s ease 0.6s forwards;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 400;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }

        .cta-button {
            display: inline-block;
            padding: 1.2rem 3rem;
            background: rgba(255, 255, 255, 0.2);
            color: var(--text-light);
            text-decoration: none;
            border-radius: 50px;
            font-weight: 600;
            font-size: 1rem;
            transform: translateY(30px);
            opacity: 0;
            animation: fadeInUp 1s ease 0.8s forwards;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(10px);
            letter-spacing: 0.5px;
        }

        .cta-button:hover {
            transform: translateY(-3px);
            background: rgba(255, 255, 255, 0.25);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
            border-color: rgba(255, 255, 255, 0.4);
        }

        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Scroll Indicator */
        .scroll-indicator {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 50px;
            border: 2px solid rgba(255, 255, 255, 0.6);
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .scroll-indicator:hover {
            border-color: rgba(255, 255, 255, 0.9);
        }

        .scroll-indicator::before {
            content: '';
            position: absolute;
            top: 10px;
            left: 50%;
            width: 6px;
            height: 6px;
            background: rgba(255, 255, 255, 0.8);
            border-radius: 50%;
            transform: translateX(-50%);
            animation: scroll 2s infinite;
        }

        @keyframes scroll {
            0% { transform: translateX(-50%) translateY(0); opacity: 1; }
            100% { transform: translateX(-50%) translateY(20px); opacity: 0; }
        }

        /* Section Styles */
        section {
            padding: 8rem 0;
        }

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

        .section-title {
            text-align: center;
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
            font-size: 3.5rem;
            font-weight: 600;
            margin-bottom: 4rem;
            background: var(--gradient-elegant);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            letter-spacing: -1px;
            position: relative;
        }

        .section-title::after {
            content: '';
            position: absolute;
            width: 60px;
            height: 4px;
            background: var(--gradient-primary);
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 2px;
        }

        /* About Section */
        .about {
            background: var(--bg-secondary);
            position: relative;
        }

        .about::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
        }

        .about-content {
            display: grid;

            grid-template-columns: 1fr 1.5fr;
            gap: 6rem;
            align-items: center;
            position: relative;
        }

        /* รูปโปรไฟล์ขนาดจริง 354x426 จำกัดความกว้างไว้ไม่ให้รูปแตก */
        .about-image {
            width: 100%;
            max-width: 360px;
            aspect-ratio: 354 / 426;
            justify-self: center;
            border-radius: 30px;
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-2xl);
            transform: rotate(-2deg);
            transition: transform 0.4s ease;
        }

        .about-image:hover {
            transform: rotate(0deg) scale(1.02);
        }

        .about-image::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .about-image img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .about-image:hover::before {
            opacity: 0.7;
        }

        .about-image::after {

        }

        .about-text h3 {
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
            font-size: 2.5rem;
            margin-bottom: 2rem;
            color: var(--text-primary);
            font-weight: 500;
            line-height: 1.3;
        }

        .about-text p {
            font-size: 1.1rem;
            color: var(--text-secondary);
            margin-bottom: 2rem;
            line-height: 1.8;
        }

        .skills {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
            margin-top: 3rem;
        }

        .skill-tag {
            padding: 0.75rem 1.5rem;
            background: var(--bg-card);
            color: var(--primary-color);
            border-radius: 30px;
            font-size: 0.9rem;
            font-weight: 600;
            border: 1px solid rgba(99, 102, 241, 0.2);
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .skill-tag:hover {
            background: var(--primary-color);
            color: var(--text-light);
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        /* Portfolio Section */
        .portfolio {
            background: var(--bg-primary);
        }

        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 3rem;
            margin-top: 2rem;
        }

        .portfolio-item {
            background: var(--bg-card);
            border-radius: 25px;
            overflow: hidden;
            box-shadow: var(--shadow-lg);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            transform: translateY(20px);
            opacity: 0;
            border: 1px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
        }

        .portfolio-item.animate {
            transform: translateY(0);
            opacity: 1;
        }

        .portfolio-item:hover {
            transform: translateY(-15px);
            box-shadow: var(--shadow-2xl);
        }

        .portfolio-image {
            width: 100%;
            height: 180px;
            background: var(--gradient-primary);
            position: relative;
            overflow: hidden;
            background-size: cover;
            background-position: center;
        }

        .portfolio-image::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.1) 100%);
            transition: all 0.3s ease;
        }

        .portfolio-item:hover .portfolio-image::before {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.3) 100%);
        }

        .portfolio-content {
            padding: 2rem;
        }

        .portfolio-content h4 {
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: var(--text-primary);
            font-weight: 600;
        }

        .portfolio-content p {
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
            line-height: 1.7;
        }

        .portfolio-tech {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
        }

        .tech-tag {
            padding: 0.4rem 1rem;
            background: var(--bg-secondary);
            color: var(--text-secondary);
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .tech-tag:hover {
            background: var(--primary-color);
            color: var(--text-light);
        }

        /* Contact Section */
        .contact {
            background: linear-gradient(135deg, #3b4cb8 0%, #4a2c65 50%, #9c35a8 100%);
            color: var(--text-light);
            position: relative;
            overflow: hidden;
        }

        .contact::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="contact-grid" width="8" height="8" patternUnits="userSpaceOnUse"><path d="M 8 0 L 0 0 0 8" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23contact-grid)"/></svg>');
            animation: contactFloat 30s ease-in-out infinite;
            opacity: 0.6;
        }

        .contact::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(circle at 25% 75%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
                        radial-gradient(circle at 75% 25%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
                        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
            animation: contactPulse 6s ease-in-out infinite alternate;
        }

        /* Contact Floating Shapes */
        .contact-floating-shapes {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1;
        }

        .contact-shape {
            position: absolute;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 50%;
        }

        .contact-shape-1 {
            width: 70px;
            height: 70px;
            top: 15%;
            left: 8%;
            animation: contactFloatShape1 24s ease-in-out infinite;
        }

        .contact-shape-2 {
            width: 110px;
            height: 110px;
            top: 65%;
            right: 12%;
            background: rgba(255, 255, 255, 0.06);
            animation: contactFloatShape2 28s ease-in-out infinite reverse;
        }

        .contact-shape-3 {
            width: 55px;
            height: 55px;
            top: 25%;
            right: 30%;
            background: rgba(255, 255, 255, 0.1);
            animation: contactFloatShape3 20s ease-in-out infinite;
        }

        .contact-shape-4 {
            width: 90px;
            height: 90px;
            bottom: 20%;
            left: 18%;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 25px;
            animation: contactFloatShape4 26s ease-in-out infinite;
        }

        .contact-shape-5 {
            width: 35px;
            height: 35px;
            top: 12%;
            right: 45%;
            background: rgba(255, 255, 255, 0.12);
            animation: contactFloatShape5 18s ease-in-out infinite reverse;
        }

        .contact-shape-6 {
            width: 130px;
            height: 130px;
            bottom: 12%;
            right: 8%;
            background: rgba(255, 255, 255, 0.04);
            border-radius: 35px;
            animation: contactFloatShape6 32s ease-in-out infinite;
        }

        @keyframes contactFloatShape1 {
            0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            25% { transform: translateY(-25px) translateX(15px) rotate(90deg); }
            50% { transform: translateY(-10px) translateX(-8px) rotate(180deg); }
            75% { transform: translateY(-35px) translateX(12px) rotate(270deg); }
        }

        @keyframes contactFloatShape2 {
            0%, 100% { transform: translateY(0px) translateX(0px) scale(1); }
            33% { transform: translateY(20px) translateX(-15px) scale(1.05); }
            66% { transform: translateY(-15px) translateX(20px) scale(0.95); }
        }

        @keyframes contactFloatShape3 {
            0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            50% { transform: translateY(-20px) translateX(-25px) rotate(180deg); }
        }

        @keyframes contactFloatShape4 {
            0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            25% { transform: translateY(15px) translateX(-12px) rotate(30deg); }
            50% { transform: translateY(-8px) translateX(25px) rotate(60deg); }
            75% { transform: translateY(12px) translateX(-18px) rotate(90deg); }
        }

        @keyframes contactFloatShape5 {
            0%, 100% { transform: translateY(0px) translateX(0px) scale(1); }
            50% { transform: translateY(-30px) translateX(15px) scale(1.15); }
        }

        @keyframes contactFloatShape6 {
            0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
            33% { transform: translateY(-12px) translateX(8px) rotate(45deg); }
            66% { transform: translateY(8px) translateX(-20px) rotate(90deg); }
        }

        @keyframes contactFloat {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            33% { transform: translateY(-15px) rotate(0.5deg); }
            66% { transform: translateY(-10px) rotate(-0.5deg); }
        }

        @keyframes contactPulse {
            0% { opacity: 0.4; }
            100% { opacity: 0.7; }
        }

        .contact-content {
            text-align: center;
            max-width: 700px;
            margin: 0 auto;
            position: relative;
            z-index: 10;
        }

        .contact .section-title {
            color: var(--text-light);
            background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .contact-form {
            display: grid;
            gap: 2rem;
            margin-top: 3rem;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
        }

        .form-group {
            display: grid;
            gap: 0.75rem;
            text-align: left;
        }

        .form-group label {
            font-weight: 500;
            color: rgba(255, 255, 255, 0.9);
            font-size: 0.9rem;
        }

        .form-group input,
        .form-group textarea {
            padding: 1.2rem;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-light);
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
            font-size: 1rem;
            font-weight: 400;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            backdrop-filter: blur(10px);
            resize: vertical;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.12);
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .form-group input::placeholder,
        .form-group textarea::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .submit-btn {
            padding: 1.2rem 3rem;
            background: var(--gradient-primary);
            color: var(--text-light);
            border: none;
            border-radius: 50px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            margin-top: 1rem;
            letter-spacing: 0.5px;
        }

        .submit-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
        }

        /* Animation Classes */
        .fade-in {
            opacity: 0;
            transform: translateY(40px);
            transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

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

        .slide-in-left {
            opacity: 0;
            transform: translateX(-60px);
            transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .slide-in-left.animate {
            opacity: 1;
            transform: translateX(0);
        }

        .slide-in-right {
            opacity: 0;
            transform: translateX(60px);
            transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .slide-in-right.animate {
            opacity: 1;
            transform: translateX(0);
        }

        /* Mobile Responsiveness */
        @media (max-width: 1024px) {
            .portfolio-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 2rem;
            }

            .about-content {
                grid-template-columns: 1fr;
                gap: 4rem;
            }

            .hero h1 {
                font-size: 4rem;
            }
        }

        @media (max-width: 768px) {
            .nav-links {
                display: none;
            }

            .mobile-menu-toggle {
                display: flex;
            }

            .hero h1 {
                font-size: 3rem;
            }

            .hero .subtitle {
                font-size: 1.1rem;
            }

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

            .portfolio-grid {
                grid-template-columns: 1fr;
            }

            .container {
                padding: 0 1.5rem;
            }

            section {
                padding: 5rem 0;
            }

            .form-row {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }

            .about-text h3 {
                font-size: 2rem;
            }

            .skills {
                margin-top: 2rem;
            }
        }

        @media (max-width: 480px) {
            /* ย่อตามความกว้างจอ ให้นามสกุล Chaiyaphonthanakan อยู่ในบรรทัดเดียวบนมือถือจอเล็ก */
            .hero h1 {
                font-size: clamp(1.75rem, 9.5vw, 2.5rem);
            }

            .section-title {
                font-size: 2rem;
            }

            .nav-container {
                padding: 0 1rem;
            }

            .container {
                padding: 0 1rem;
            }
        }

        /* =========================================================
           ส่วนที่เพิ่มสำหรับ Portfolio ของ Thanyathorn
           (Education, Projects, Experience, Skills, Contact cards)
           ========================================================= */

        /* Hero: สูงตามเนื้อหา ไม่ตัดข้อความบนจอเตี้ย */
        .hero {
            height: auto;
            min-height: 100vh;
            padding: 8rem 0 7rem;
        }

        .hero .subtitle {
            margin-bottom: 2rem;
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.6rem;
            margin-bottom: 2.5rem;
            padding: 0.6rem 1.4rem;
            border-radius: 50px;
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            font-weight: 600;
            font-size: 0.95rem;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeInUp 1s ease 0.7s forwards;
        }

        .hero-buttons {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .cta-button.cta-light {
            background: var(--text-light);
            color: var(--secondary-color);
            border-color: var(--text-light);
        }

        .cta-button.cta-light:hover {
            background: var(--text-light);
        }

        /* Navigation: ไฮไลต์เมนูของ section ที่กำลังดู */
        .nav-links a.active {
            color: var(--primary-color);
        }

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

        .mobile-nav-links li {
            margin: 0.9rem 0;
        }

        .mobile-nav-links a {
            font-size: 1.75rem;
        }

        .mobile-menu.active .mobile-nav-links li:nth-child(5) { transition-delay: 0.5s; }
        .mobile-menu.active .mobile-nav-links li:nth-child(6) { transition-delay: 0.6s; }
        .mobile-menu.active .mobile-nav-links li:nth-child(7) { transition-delay: 0.7s; }
        .mobile-menu.active .mobile-nav-links li:nth-child(8) { transition-delay: 0.8s; }

        /* เมนูมี 8 หัวข้อ ลดระยะห่างบนจอกลางไม่ให้ล้น */
        @media (max-width: 1200px) {
            .nav-links {
                gap: 1.5rem;
            }
        }

        /* About */
        .about-label {
            display: block;
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: var(--primary-color);
            margin-bottom: 0.75rem;
        }

        .about-text h3 {
            margin-bottom: 1.5rem;
        }

        .about-text p {
            margin-bottom: 1.25rem;
        }

        .about-text p + .about-label {
            margin-top: 2rem;
        }

        .info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        .info-item {
            background: var(--bg-card);
            border: 1px solid rgba(99, 102, 241, 0.15);
            border-radius: 16px;
            padding: 1rem 1.25rem;
        }

        .info-label {
            display: block;
            font-size: 0.8rem;
            font-weight: 600;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        .info-value {
            font-weight: 600;
            color: var(--text-primary);
        }

        /* Education */
        .education {
            background: var(--bg-primary);
        }

        .edu-card {
            max-width: 1000px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: auto 1fr;
            gap: 3rem;
            align-items: start;
            background: var(--bg-card);
            border: 1px solid rgba(99, 102, 241, 0.1);
            border-radius: 25px;
            box-shadow: var(--shadow-xl);
            padding: 3rem;
        }

        .edu-badge {
            width: 140px;
            height: 140px;
            border-radius: 50%;
            background: var(--gradient-primary);
            color: var(--text-light);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow-lg);
        }

        .edu-badge strong {
            font-size: 2.5rem;
            line-height: 1;
        }

        .edu-badge span {
            font-size: 0.85rem;
            font-weight: 600;
            letter-spacing: 2px;
        }

        .edu-period {
            display: inline-block;
            padding: 0.35rem 1rem;
            border-radius: 20px;
            background: rgba(99, 102, 241, 0.1);
            color: var(--primary-color);
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 1rem;
        }

        .edu-body h3 {
            font-size: 1.75rem;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 0.5rem;
        }

        .edu-school {
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }

        .edu-body h4 {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 0.75rem;
        }

        /* Projects */
        .projects {
            background: var(--bg-secondary);
        }

        .portfolio-image.icon-cover {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 3.5rem;
            color: rgba(255, 255, 255, 0.9);
        }

        .portfolio-image.icon-cover i {
            position: relative;
            z-index: 1;
        }

        .portfolio-image.cover-1 { background: var(--gradient-primary); }
        .portfolio-image.cover-2 { background: var(--gradient-tertiary); }
        .portfolio-image.cover-3 { background: var(--gradient-secondary); }

        .portfolio-image.shot {
            background-color: #e2e8f0;
            background-position: top center;
        }

        .project-year {
            display: inline-block;
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }

        .portfolio-content h4 {
            margin-bottom: 0.5rem;
        }

        .portfolio-content .project-course {
            font-size: 0.95rem;
            font-style: italic;
        }

        .portfolio-content ul {
            padding-left: 1.2rem;
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }

        .portfolio-content li + li {
            margin-top: 0.5rem;
        }

        .portfolio-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            margin-top: 1.5rem;
            font-weight: 600;
            color: var(--primary-color);
            text-decoration: none;
            transition: gap 0.3s ease;
        }

        .portfolio-link:hover {
            gap: 0.85rem;
        }

        .subsection-title {
            text-align: center;
            font-size: 1.9rem;
            font-weight: 600;
            margin: 6rem 0 0.5rem;
            color: var(--text-primary);
        }

        .subsection-desc {
            text-align: center;
            color: var(--text-secondary);
            margin-bottom: 1rem;
        }

        /* University Activities */
        .activities {
            background: var(--bg-primary);
        }

        .activity-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            margin-bottom: 0.5rem;
        }

        .activity-hint {
            color: var(--text-secondary);
            font-size: 0.95rem;
        }

        .activity-arrows {
            display: flex;
            gap: 0.75rem;
            flex-shrink: 0;
        }

        .activity-arrow {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            border: 1px solid rgba(99, 102, 241, 0.25);
            background: var(--bg-card);
            color: var(--primary-color);
            font-size: 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .activity-arrow:hover:not(:disabled) {
            background: var(--gradient-primary);
            color: var(--text-light);
            border-color: transparent;
        }

        .activity-arrow:disabled {
            opacity: 0.35;
            cursor: default;
        }

        .activity-arrow:focus-visible,
        .activity-scroller:focus-visible {
            outline: 3px solid rgba(99, 102, 241, 0.45);
            outline-offset: 3px;
        }

        /* แถวการ์ดเลื่อนซ้าย-ขวา (scroll เฉพาะในกล่องนี้ ไม่ทำให้ทั้งหน้าเลื่อนข้าง) */
        .activity-scroller {
            display: flex;
            gap: 1.5rem;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            scroll-padding-inline: 0.25rem;
            padding: 0.75rem 0.25rem 1.5rem;
            scrollbar-width: thin;
            scrollbar-color: rgba(99, 102, 241, 0.35) transparent;
        }

        .activity-scroller::-webkit-scrollbar {
            height: 8px;
        }

        .activity-scroller::-webkit-scrollbar-thumb {
            background: rgba(99, 102, 241, 0.35);
            border-radius: 4px;
        }

        .activity-card {
            flex: 0 0 min(300px, 80%);
            scroll-snap-align: start;
            display: flex;
            flex-direction: column;
            background: var(--bg-card);
            border: 1px solid rgba(99, 102, 241, 0.12);
            border-radius: 22px;
            overflow: hidden;
            box-shadow: var(--shadow-md);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .activity-card:hover {
            transform: translateY(-6px);
            box-shadow: var(--shadow-xl);
        }

        /* รูปกิจกรรมบนหัวการ์ด (ถ้ามีหลายรูป สลับด้วยจุด หรือกดที่รูป) */
        .activity-cover {
            position: relative;
            height: 200px;
            overflow: hidden;
            background: var(--bg-secondary);
        }

        .activity-cover img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            opacity: 0;
            transition: opacity 0.45s ease;
        }

        .activity-cover img.is-active {
            opacity: 1;
        }

        .activity-cover:has(.gallery-dots) {
            cursor: pointer;
        }

        .activity-type {
            position: absolute;
            top: 0.75rem;
            left: 0.75rem;
            z-index: 2;
            padding: 0.3rem 0.75rem;
            border-radius: 20px;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(6px);
            color: var(--text-light);
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }

        .gallery-dots {
            position: absolute;
            left: 50%;
            bottom: 0.5rem;
            transform: translateX(-50%);
            z-index: 2;
            display: flex;
            gap: 0.15rem;
            padding: 0 0.35rem;
            border-radius: 20px;
            background: rgba(15, 23, 42, 0.35);
        }

        .gallery-dots button {
            width: 24px;
            height: 24px;
            padding: 0;
            border: 0;
            background: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .gallery-dots button::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.6);
            transition: all 0.3s ease;
        }

        .gallery-dots button.is-active::before {
            width: 18px;
            background: var(--text-light);
        }

        .gallery-dots button:focus-visible {
            outline: 2px solid var(--text-light);
            outline-offset: -2px;
            border-radius: 50%;
        }

        .activity-body {
            padding: 1.5rem;
        }

        .activity-date {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 0.5rem;
        }

        .activity-body h4 {
            font-size: 1.3rem;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 0.5rem;
        }

        .activity-role {
            display: flex;
            align-items: baseline;
            gap: 0.4rem;
            color: var(--secondary-color);
            font-weight: 600;
        }

        @media (max-width: 600px) {
            .activity-hint {
                font-size: 0.85rem;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .activity-card,
            .activity-card:hover {
                transition: none;
                transform: none;
            }

            .activity-cover img,
            .gallery-dots button::before {
                transition: none;
            }
        }

        /* Work Experience: timeline */
        .experience {
            background: var(--bg-secondary);
        }

        .timeline {
            position: relative;
            max-width: 900px;
            margin: 0 auto;
            padding-left: 2.5rem;
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 0.55rem;
            top: 0.5rem;
            bottom: 0.5rem;
            width: 3px;
            background: var(--gradient-elegant);
            border-radius: 2px;
        }

        .timeline-item {
            position: relative;
            background: var(--bg-card);
            border: 1px solid rgba(99, 102, 241, 0.1);
            border-radius: 20px;
            box-shadow: var(--shadow-lg);
            padding: 2rem 2.25rem;
        }

        .timeline-item + .timeline-item {
            margin-top: 2rem;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: calc(-2.5rem + 2px);
            top: 2.3rem;
            width: 1.1rem;
            height: 1.1rem;
            border-radius: 50%;
            background: var(--bg-primary);
            border: 4px solid var(--secondary-color);
        }

        .timeline-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 1rem;
            flex-wrap: wrap;
            margin-bottom: 1rem;
        }

        .timeline-head h3 {
            font-size: 1.35rem;
            font-weight: 600;
            line-height: 1.3;
        }

        .timeline-company {
            color: var(--primary-color);
            font-weight: 600;
        }

        .timeline-period {
            padding: 0.35rem 1rem;
            border-radius: 20px;
            background: rgba(139, 92, 246, 0.1);
            color: var(--secondary-color);
            font-size: 0.85rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .timeline-item ul {
            padding-left: 1.2rem;
            color: var(--text-secondary);
        }

        .timeline-item li + li {
            margin-top: 0.4rem;
        }

        /* กรอบ certificate ในการ์ดงาน */
        .timeline-media {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-top: 1.5rem;
        }

        .media-frame {
            flex: 0 1 220px;
            max-width: 100%;
            aspect-ratio: 4 / 3;
            margin: 0;
            border-radius: 14px;
            overflow: hidden;
            background: var(--bg-secondary);
            border: 1px solid rgba(99, 102, 241, 0.1);
        }

        .media-frame a {
            display: block;
            height: 100%;
        }

        .media-frame img {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .media-frame a:hover img {
            transform: scale(1.04);
        }

        .timeline-award {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            margin-top: 0.5rem;
            padding: 0.3rem 0.85rem;
            border-radius: 20px;
            background: rgba(245, 158, 11, 0.12);
            color: #b45309;
            font-size: 0.85rem;
            font-weight: 600;
        }

        .media-frame.certificate img {
            object-fit: contain;
            background: var(--bg-primary);
        }


        /* Skills */
        .skills-section {
            background: var(--bg-primary);
        }

        .skills-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 3rem;
        }

        .skills-panel {
            background: var(--bg-card);
            border: 1px solid rgba(99, 102, 241, 0.1);
            border-radius: 25px;
            box-shadow: var(--shadow-lg);
            padding: 2.5rem;
        }

        .skills-panel > h3 {
            font-size: 1.6rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
        }

        .skills-panel > h3 i {
            color: var(--primary-color);
            margin-right: 0.5rem;
        }

        .skill-group + .skill-group {
            margin-top: 1.75rem;
        }

        .skill-group h4 {
            font-size: 0.85rem;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: var(--text-secondary);
            margin-bottom: 0.75rem;
        }

        .skill-group .skills {
            margin-top: 0;
            gap: 0.6rem;
        }

        .skill-group .skill-tag {
            padding: 0.55rem 1.1rem;
        }

        .soft-list {
            list-style: none;
            display: grid;
            gap: 1rem;
        }

        .soft-item {
            padding: 1rem 1.25rem;
            border-radius: 16px;
            background: var(--bg-secondary);
            border-left: 4px solid var(--secondary-color);
        }

        .soft-item strong {
            display: block;
            color: var(--text-primary);
        }

        .soft-item span {
            color: var(--text-secondary);
            font-size: 0.95rem;
        }

        /* Contact cards (แทนฟอร์มเดิมของเทมเพลตที่ไม่ได้ส่งข้อความจริง) */
        .contact-content {
            max-width: 800px;
        }

        .contact-content > p {
            font-size: 1.15rem;
            color: rgba(255, 255, 255, 0.9);
        }

        .contact-info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.25rem;
            margin-top: 3rem;
            text-align: left;
        }

        /* จำนวนการ์ดเป็นเลขคี่: ใบสุดท้ายกว้างเต็มแถว ไม่เหลือช่องว่าง */
        .contact-info-grid > :last-child:nth-child(odd) {
            grid-column: 1 / -1;
        }

        .contact-card {
            display: flex;
            align-items: center;
            gap: 1rem;
            min-width: 0;
            padding: 1.25rem 1.5rem;
            border-radius: 18px;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: var(--text-light);
            text-decoration: none;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
        }

        a.contact-card:hover {
            background: rgba(255, 255, 255, 0.16);
            transform: translateY(-3px);
        }

        .contact-card i {
            width: 48px;
            height: 48px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.15);
            font-size: 1.2rem;
        }

        .contact-card div {
            min-width: 0;
        }

        .contact-card small {
            display: block;
            font-size: 0.8rem;
            letter-spacing: 1px;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.7);
        }

        .contact-card span {
            font-weight: 600;
            overflow-wrap: anywhere;
        }

        /* Projects: การ์ดแต่ละปีกดได้ทั้งใบ ไปหน้าโปรเจกต์ของปีนั้น */
        .section-lead {
            text-align: center;
            color: var(--text-secondary);
            font-size: 1.1rem;
            margin: -1.5rem 0 2rem;
        }

        a.portfolio-item {
            display: block;
            color: inherit;
            text-decoration: none;
        }

        .year-card h4 {
            font-size: 1.9rem;
            margin-bottom: 0.25rem;
        }

        .portfolio-content .year-focus {
            color: var(--primary-color);
            font-weight: 600;
            margin-bottom: 0.35rem;
        }

        /* คำอธิบายสั้นใต้ชื่อการ์ดโปรเจกต์ (ระยะห่างก่อนลิงก์มาจาก .portfolio-link) */
        .portfolio-content .card-desc {
            margin: -0.5rem 0 0;
            font-size: 0.95rem;
            line-height: 1.6;
        }

        .year-card:hover .portfolio-link {
            gap: 0.85rem;
        }

        /* หน้าโปรเจกต์รายปี (projects-year-1/2/3.html) */
        .page-hero {
            position: relative;
            overflow: hidden;
            display: flex;
            justify-content: center;
            padding: 9rem 0 5rem;
            background: var(--gradient-elegant);
            color: var(--text-light);
            text-align: center;
        }

        .page-hero h1 {
            font-size: 3.75rem;
            font-weight: 700;
            line-height: 1.1;
            letter-spacing: -1px;
            margin-bottom: 1rem;
        }

        .page-hero-course {
            max-width: 640px;
            margin: 0 auto;
            font-size: 1.15rem;
            color: rgba(255, 255, 255, 0.9);
        }

        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 2rem;
            padding: 0.5rem 1.1rem;
            border-radius: 50px;
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: var(--text-light);
            font-size: 0.9rem;
            font-weight: 600;
            text-decoration: none;
            transition: background 0.3s ease;
        }

        .back-link:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        .year-page {
            padding-top: 5rem;
        }

        .project-feature {
            display: grid;
            grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
            background: var(--bg-card);
            border: 1px solid rgba(99, 102, 241, 0.1);
            border-radius: 25px;
            overflow: hidden;
            box-shadow: var(--shadow-xl);
        }

        .project-feature .portfolio-image {
            height: auto;
            min-height: 280px;
            font-size: 5rem;
        }

        .project-feature-body {
            min-width: 0;
            padding: 2.5rem;
        }

        .project-feature-body h2 {
            font-size: 2rem;
            font-weight: 600;
            line-height: 1.25;
            margin-bottom: 0.5rem;
        }

        .project-feature-body .project-course {
            color: var(--text-secondary);
            font-style: italic;
            margin-bottom: 1.25rem;
        }

        .project-feature-body ul {
            padding-left: 1.2rem;
            color: var(--text-secondary);
            margin-bottom: 1.5rem;
        }

        .project-feature-body li + li {
            margin-top: 0.5rem;
        }

        .year-page .portfolio-grid,
        .overview-year .portfolio-grid {
            grid-template-columns: repeat(2, 1fr);
        }

        .portfolio-image.placeholder-cover {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            background: var(--bg-secondary);
            color: var(--primary-color);
            font-size: 2rem;
            border-bottom: 2px dashed rgba(99, 102, 241, 0.25);
        }

        .portfolio-image.placeholder-cover::before {
            display: none;
        }

        .placeholder-cover span {
            font-size: 0.8rem;
            font-weight: 600;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: var(--text-secondary);
        }

        /* ปกการ์ดในหน้ารายปีสูงกว่าหน้าแรก ให้เห็นภาพหน้าจอแอปชัดขึ้น */
        .year-page .portfolio-grid .portfolio-image,
        .overview-year .portfolio-grid .portfolio-image {
            height: 260px;
        }

        /* ภาพ mockup มือถือพื้นดำ: แสดงเต็มภาพไม่ครอป */
        .portfolio-image.mockup {
            background-color: #000;
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
        }

        .portfolio-image.mockup::before {
            display: none;
        }

        /* ภาพรวมหน้าจอจาก Figma (พื้นเทา #f5f5f5): แสดงเต็มภาพบนพื้นสีเดียวกัน */
        .portfolio-image.board {
            background-color: #f5f5f5;
            background-size: contain;
            background-repeat: no-repeat;
            background-position: center;
            border-bottom: 1px solid rgba(15, 23, 42, 0.06);
        }

        .portfolio-image.board::before {
            display: none;
        }

        /* หน้า All Projects (projects-all.html): รวมโปรเจกต์ทุกปี */
        .projects-more {
            text-align: center;
            margin-top: 3rem;
        }

        .overview-jump {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-top: 2rem;
        }

        .overview-jump a {
            padding: 0.5rem 1.25rem;
            border-radius: 50px;
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: var(--text-light);
            font-size: 0.9rem;
            font-weight: 600;
            text-decoration: none;
            transition: background 0.3s ease;
        }

        .overview-jump a:hover {
            background: rgba(255, 255, 255, 0.28);
        }

        .overview-year {
            scroll-margin-top: 90px;
        }

        .overview-year + .overview-year {
            margin-top: 6rem;
        }

        .overview-year-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            flex-wrap: wrap;
            gap: 1rem;
            padding-bottom: 1.25rem;
            border-bottom: 1px solid rgba(99, 102, 241, 0.15);
        }

        .overview-year-head > div {
            min-width: 0;
        }

        .overview-year-head h2 {
            font-size: 2.4rem;
            font-weight: 700;
            line-height: 1.1;
            background: var(--gradient-elegant);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .overview-year-head .project-course {
            margin-top: 0.35rem;
            color: var(--text-secondary);
            font-style: italic;
        }

        .overview-year .project-feature {
            margin-top: 2rem;
        }

        a.project-feature {
            color: inherit;
            text-decoration: none;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        a.project-feature:hover {
            transform: translateY(-6px);
            box-shadow: var(--shadow-2xl);
        }

        .project-feature-body h3 {
            font-size: 2rem;
            font-weight: 600;
            line-height: 1.25;
            margin-bottom: 0.5rem;
        }

        .project-feature-body .project-summary {
            color: var(--text-secondary);
            margin-bottom: 1.25rem;
        }

        .project-feature .portfolio-image.shot {
            background-color: #1e1e32;
            background-position: center;
        }

        .project-feature-body .portfolio-link {
            margin-top: 1.25rem;
        }

        /* โปรเจกต์แยกตามวิชาในหน้ารายปี */
        .course-block {
            margin-top: 2.5rem;
        }

        .course-block + .course-block {
            margin-top: 4.5rem;
        }

        .course-head {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 1.25rem;
        }

        .course-head > div {
            min-width: 0;
        }

        .course-code {
            flex-shrink: 0;
            padding: 0.6rem 1rem;
            border-radius: 14px;
            background: var(--gradient-primary);
            color: var(--text-light);
            font-size: 1rem;
            font-weight: 700;
            letter-spacing: 1px;
        }

        .course-block.alt .course-code {
            background: var(--gradient-secondary);
        }

        .course-head h3 {
            font-size: 1.6rem;
            font-weight: 600;
            line-height: 1.3;
            margin-bottom: 0.5rem;
        }

        /* โปรเจกต์แบบมีวิดีโอและรายละเอียด (เช่น Brick Breaker ปี 2) */
        .project-detail {
            margin-top: 2rem;
            scroll-margin-top: 90px;
            background: var(--bg-card);
            border: 1px solid rgba(99, 102, 241, 0.1);
            border-radius: 25px;
            overflow: hidden;
            box-shadow: var(--shadow-xl);
        }

        .project-video {
            background: #000;
        }

        .project-video video {
            display: block;
            width: 100%;
            max-height: 70vh;
            aspect-ratio: 16 / 9;
            background: #000;
        }

        /* โปรเจกต์ที่ใช้รูปแทนวิดีโอ: แสดงรูปขนาดจริงบนพื้นสีเดียวกับรูป ไม่ยืดจนแตก */
        .project-media {
            display: flex;
            justify-content: center;
            background: linear-gradient(#fff8ce, #fffdf0);
        }

        .project-media img {
            display: block;
            width: 625px;
            max-width: 100%;
            height: auto;
        }

        .project-files {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            margin-top: 1.75rem;
        }

        .project-detail-body {
            padding: 2.5rem;
        }

        .project-detail-body h4 {
            font-size: 2rem;
            font-weight: 600;
            line-height: 1.25;
            margin-bottom: 0.75rem;
        }

        .project-detail-body p {
            color: var(--text-secondary);
        }

        .project-summary {
            font-size: 1.1rem;
            max-width: 75ch;
        }

        .code-details {
            margin-top: 2.25rem;
            border: 1px solid rgba(99, 102, 241, 0.2);
            border-radius: 14px;
            overflow: hidden;
        }

        .code-details summary {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem 1.25rem;
            cursor: pointer;
            font-weight: 600;
            color: var(--primary-color);
            background: rgba(99, 102, 241, 0.06);
        }

        .code-details summary:focus-visible {
            outline: 3px solid rgba(99, 102, 241, 0.45);
            outline-offset: -3px;
        }

        .code-details pre {
            margin: 0;
            max-height: 480px;
            overflow: auto;
            padding: 1.25rem;
            background: #0f172a;
            color: #e2e8f0;
            font-family: Consolas, 'Courier New', monospace;
            font-size: 0.85rem;
            line-height: 1.6;
            tab-size: 4;
        }

        .code-details pre code {
            font: inherit;
        }

        @media (max-width: 768px) {
            .project-detail-body {
                padding: 1.75rem 1.25rem;
            }

            .project-detail-body h4 {
                font-size: 1.6rem;
            }
        }

        .year-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
            margin-top: 5rem;
            padding-top: 2rem;
            border-top: 1px solid rgba(99, 102, 241, 0.15);
        }

        .year-nav-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.4rem;
            border-radius: 50px;
            border: 1px solid rgba(99, 102, 241, 0.25);
            background: var(--bg-card);
            color: var(--primary-color);
            font-weight: 600;
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .year-nav-link:hover {
            background: var(--gradient-primary);
            color: var(--text-light);
            border-color: transparent;
        }

        @media (max-width: 768px) {
            .page-hero {
                padding: 8rem 0 4rem;
            }

            .page-hero h1 {
                font-size: 2.6rem;
            }

            .project-feature {
                grid-template-columns: 1fr;
            }

            .project-feature .portfolio-image {
                min-height: 180px;
                font-size: 3.5rem;
            }

            .project-feature-body {
                padding: 1.75rem 1.5rem;
            }

            .year-page .portfolio-grid,
            .overview-year .portfolio-grid {
                grid-template-columns: 1fr;
            }

            .year-nav {
                justify-content: center;
            }

            .year-nav > span {
                display: none;
            }
        }

        /* กันหน้าเว็บเลื่อนซ้ายขวาได้ ระหว่างที่ slide-in ยังอยู่นอกจอ 60px */
        .about,
        .skills-section {
            overflow-x: clip;
        }

        /* Responsive สำหรับส่วนที่เพิ่ม */
        @media (max-width: 1024px) {
            .skills-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 900px) {
            .nav-links {
                display: none;
            }

            .mobile-menu-toggle {
                display: flex;
            }
        }

        @media (max-width: 768px) {
            .hero {
                padding: 7rem 0 6rem;
            }

            .edu-card {
                grid-template-columns: 1fr;
                justify-items: center;
                text-align: center;
                padding: 2rem 1.5rem;
                gap: 1.5rem;
            }

            .edu-body .portfolio-tech {
                justify-content: center;
            }

            .info-grid,
            .contact-info-grid {
                grid-template-columns: 1fr;
            }

            .timeline {
                padding-left: 1.75rem;
            }

            .timeline::before {
                left: 0.3rem;
            }

            .timeline-item {
                padding: 1.5rem;
            }

            .timeline-item::before {
                left: calc(-1.75rem - 2px);
            }

            .skills-panel {
                padding: 1.75rem 1.5rem;
            }

            .subsection-title {
                margin-top: 4rem;
            }
        }

        @media (max-width: 480px) {
            .media-frame {
                flex-basis: 100%;
            }
        }