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

    :root {
      --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
      --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      --dark-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
      --glass-bg: rgba(255, 255, 255, 0.1);
      --glass-border: rgba(255, 255, 255, 0.2);
      --text-glow: 0 0 20px rgba(255, 255, 255, 0.5);
      --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    }

    body {
      font-family: 'Prompt', sans-serif;
      background: var(--dark-gradient);
      color: white;
      overflow-x: hidden;
      line-height: 1.6;
    }

    /* Floating Background Elements */
    .bg-elements {
      position: fixed;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: -1;
    }

    .floating-shape {
      position: absolute;
      background: var(--accent-gradient);
      border-radius: 50%;
      opacity: 0.1;
      animation: float 20s infinite linear;
    }

    .shape-1 { width: 80px; height: 80px; top: 20%; left: 10%; animation-delay: 0s; }
    .shape-2 { width: 120px; height: 120px; top: 60%; left: 80%; animation-delay: -5s; }
    .shape-3 { width: 60px; height: 60px; top: 80%; left: 20%; animation-delay: -10s; }
    .shape-4 { width: 100px; height: 100px; top: 30%; left: 70%; animation-delay: -15s; }

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

    /* Navigation */
    nav {
      position: fixed;
      top: 0;
      width: 100%;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(10px);
      z-index: 1000;
      padding: 1rem 0;
      transition: all 0.3s ease;
    }

    nav ul {
      display: flex;
      justify-content: center;
      list-style: none;
      gap: 2rem;
    }

    nav a {
      color: white;
      text-decoration: none;
      font-weight: 500;
      padding: 0.5rem 1rem;
      border-radius: 25px;
      transition: all 0.3s ease;
      position: relative;
    }

    nav a::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: var(--accent-gradient);
      border-radius: 25px;
      opacity: 0;
      transition: opacity 0.3s ease;
      z-index: -1;
    }

    nav a:hover::before {
      opacity: 1;
    }

    /* Header Section */
    header {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      position: relative;
      text-align: center;
      padding: 2rem;
    }

    .profile-container {
      position: relative;
      margin-bottom: 2rem;
    }

    .profile-image {
      width: 200px;
      height: 200px;
      border-radius: 50%;
      
      box-shadow: var(--card-shadow);
      position: relative;
      overflow: hidden;
      animation: pulse 3s infinite;
    }

    .profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ให้ภาพครอบเต็มวง */
  display: block;
}

    .profile-image::before {
      content: '';
      position: absolute;
      top: -2px;
      left: -2px;
      right: -2px;
      bottom: -2px;
      background: var(--accent-gradient);
      border-radius: 50%;
      z-index: -1;
      animation: rotate 4s linear infinite;
    }

    @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.05); }
    }

    @keyframes rotate {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .main-title {
      font-size: clamp(2.5rem, 5vw, 4rem);
      font-weight: 700;
      margin-bottom: 1rem;
      background: var(--accent-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-shadow: var(--text-glow);
      animation: fadeInUp 1s ease;
    }

    .subtitle {
      font-size: 1.5rem;
      font-weight: 300;
      opacity: 0.8;
      margin-bottom: 2rem;
      animation: fadeInUp 1s ease 0.2s both;
    }

    .cta-buttons {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
      justify-content: center;
      animation: fadeInUp 1s ease 0.4s both;
    }

    .btn {
      padding: 1rem 2rem;
      border: none;
      border-radius: 50px;
      font-family: inherit;
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .btn-primary {
      background: var(--accent-gradient);
      color: white;
    }

    .btn-secondary {
      background: transparent;
      color: white;
      border: 2px solid rgba(255, 255, 255, 0.3);
    }

    .btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.5s ease;
    }

    .btn:hover::before {
      left: 100%;
    }

    .btn:hover {
      transform: translateY(-3px);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    /* Section Styling */
    section {
      padding: 5rem 10%;
      position: relative;
    }

    .glass-card {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border-radius: 20px;
      border: 1px solid var(--glass-border);
      box-shadow: var(--card-shadow);
      padding: 2rem;
      margin-bottom: 2rem;
      transition: all 0.3s ease;
    }

    .glass-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 15px 40px 0 rgba(31, 38, 135, 0.5);
    }

    .section-title {
      font-size: 2.5rem;
      font-weight: 700;
      text-align: center;
      margin-bottom: 3rem;
      background: var(--primary-gradient);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* Info Section */
    .info-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 2rem;
      margin-top: 2rem;
    }

    .info-card {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border-radius: 15px;
      padding: 2rem;
      border: 1px solid var(--glass-border);
      transition: all 0.3s ease;
    }

    .info-card:hover {
      transform: translateY(-10px) rotateX(5deg);
      box-shadow: var(--card-shadow);
    }

    .info-card h3 {
      color: #4facfe;
      margin-bottom: 1rem;
      font-size: 1.3rem;
    }

    /* Timeline */
    .timeline {
      position: relative;
      margin: 2rem 0;
    }

    .timeline::before {
      content: '';
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      width: 4px;
      height: 100%;
      background: var(--accent-gradient);
      border-radius: 2px;
    }

    .timeline-item {
      display: flex;
      margin-bottom: 3rem;
      position: relative;
    }

    .timeline-item:nth-child(odd) {
      flex-direction: row-reverse;
    }

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

    .timeline-card {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border-radius: 15px;
      padding: 2rem;
      border: 1px solid var(--glass-border);
      transition: all 0.3s ease;
    }

    .timeline-card:hover {
      transform: scale(1.05);
    }

    .timeline-dot {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      width: 20px;
      height: 20px;
      background: var(--accent-gradient);
      border-radius: 50%;
      z-index: 2;
    }

    /* Skills Section */
    .skills {
      position: relative;
    }

    .skills-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 2rem;
      margin-top: 2rem;
    }

    .skill-category {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border-radius: 20px;
      padding: 2rem;
      border: 1px solid var(--glass-border);
      transition: all 0.3s ease;
    }

    .skill-category:hover {
      transform: translateY(-10px);
    }

    .skill-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 1.5rem;
    }

    .skill-bar {
      flex: 1;
      height: 8px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 4px;
      margin: 0 1rem;
      overflow: hidden;
    }

    .skill-progress {
      height: 100%;
      background: var(--accent-gradient);
      border-radius: 4px;
      transition: width 2s ease;
    }

    /* Projects Section */
    .projects-container {
      position: relative;
      margin-top: 2rem;
      overflow: hidden;
      max-width: 100%;
    }

    .projects-carousel {
      display: flex;
      transition: transform 0.5s ease;
      gap: 2rem;
      padding: 1rem 0;
      width: fit-content;
    }

    .carousel-controls {
      display: flex;
      justify-content: center;
      gap: 1rem;
      margin-top: 2rem;
    }

    .carousel-btn {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      border: none;
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border: 1px solid var(--glass-border);
      color: white;
      font-size: 1.2rem;
      cursor: pointer;
      transition: all 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .carousel-btn:hover {
      background: var(--accent-gradient);
      transform: scale(1.1);
    }

    .carousel-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: scale(1);
    }

    .carousel-indicators {
      display: flex;
      justify-content: center;
      gap: 0.5rem;
      margin-top: 1rem;
    }

    .indicator {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.3);
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .indicator.active {
      background: var(--accent-gradient);
      transform: scale(1.2);
    }

    .project-card {
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border-radius: 20px;
      overflow: hidden;
      border: 1px solid var(--glass-border);
      transition: all 0.3s ease;
      position: relative;
      flex: 0 0 350px;
      height: 400px;
    }

    .project-card:hover {
      transform: translateY(-10px);
      box-shadow: var(--card-shadow);
    }

    .project-image {
      width: 100%;
      height: 200px;
      background: var(--primary-gradient);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 3rem;
      color: white;
      position: relative;
      overflow: hidden;
    }

    .project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* ครอบเต็มพื้นที่ โดยคงสัดส่วนและตัดเกิน */
  display: block;
}

    .project-image::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
      transition: left 0.5s ease;
    }

    .project-card:hover .project-image::before {
      left: 100%;
    }

    .project-content {
      padding: 2rem;
    }

    .project-title {
      font-size: 1.3rem;
      font-weight: 600;
      margin-bottom: 1rem;
      color: #4facfe;
    }

    .project-description {
      margin-bottom: 1.5rem;
      opacity: 0.9;
    }

    .project-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
    }

    .tag {
      padding: 0.3rem 0.8rem;
      background: var(--accent-gradient);
      border-radius: 15px;
      font-size: 0.8rem;
      font-weight: 500;
    }

    /* Contact Section */
    .contact {
      text-align: center;
      padding: 5rem 10%;
    }

    .contact-info {
      display: flex;
      justify-content: center;
      gap: 3rem;
      margin-top: 2rem;
      flex-wrap: wrap;
    }

    .contact-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 1.5rem;
      background: var(--glass-bg);
      backdrop-filter: blur(10px);
      border-radius: 15px;
      border: 1px solid var(--glass-border);
      transition: all 0.3s ease;
      min-width: 150px;
      text-decoration: none;
    }

    .contact-info a {
  text-decoration: none;   /* เอาเส้นใต้ลิงก์ออก */
  color: inherit;          /* ใช้สีเดียวกับเนื้อหาเดิม */
  display: inline-block;   /* ให้ครอบทั้งกล่องได้ */
}  /* ให้ครอบทั้งกล่องได้ */

.contact-info a:visited {
  color: inherit; /* กันสีม่วงหลังคลิกลิงก์ */
}

    .contact-item:hover {
      transform: translateY(-5px);
    }

    .contact-icon {
      width: 50px;
      height: 50px;
      background: var(--accent-gradient);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.5rem;
      margin-bottom: 1rem;
    }

    /* Animations */
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .fade-in-up {
      animation: fadeInUp 0.8s ease forwards;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
      nav ul {
        gap: 1rem;
      }

      section {
        padding: 3rem 5%;
      }

      .timeline::before {
        left: 20px;
      }

      .timeline-item {
        flex-direction: column;
        padding-left: 50px;
      }

      .timeline-item:nth-child(odd) {
        flex-direction: column;
      }

      .timeline-dot {
        left: 20px;
      }

      .contact-info {
        gap: 1rem;
      }

      .cta-buttons {
        flex-direction: column;
        align-items: center;
      }
      
      .projects-carousel {
        gap: 1rem;
      }
      
      .project-card {
        flex: 0 0 280px;
      }

      .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
      }
    }

    /* Scroll animations */
    .reveal {
      opacity: 0;
      transform: translateY(50px);
      transition: all 0.8s ease;
    }

    .reveal.active {
      opacity: 1;
      transform: translateY(0);
    }