* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-light: #3b82f6;
  --secondary: #10b981;
  --accent: #f59e0b;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 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);
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--white);
  overflow-x: hidden;
  font-size: 16px;
}

/* 滾動進度條 */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--secondary));
  z-index: 10000;
  transition: width 0.1s ease;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.5);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

p {
  color: var(--gray-700);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: transparent;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 1rem 0;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--gray-100);
}

.nav-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  transition: var(--transition);
}

.navbar.scrolled .logo-img {
  height: 42px;
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.navbar.scrolled .nav-links a {
  color: var(--gray-700);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
  border-radius: 1px;
}

.nav-links a:hover {
  color: var(--primary-light);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--white);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 1px;
}

.navbar.scrolled .mobile-menu-btn span {
  background-color: var(--gray-700);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 350px;
  height: 100vh;
  background-color: var(--white);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 6rem 2rem 2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

.mobile-menu a:hover {
  color: var(--primary);
  padding-left: 1rem;
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.6)),
    url("image/IntersoftBuilding.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  overflow: hidden;
}

#particles-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  padding: 0 2rem;
  opacity: 0;
  animation: fadeInHero 1.5s ease forwards;
}

.hero-text {
  max-width: 700px;
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  color: var(--white);
  position: relative;
}

/* 打字機效果 */
.typing-text {
  overflow: hidden;
  white-space: nowrap;
  display: inline-block;
  position: relative;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary);
  }
}

/* 動畫完成後移除游標 */
.typing-text.typing-complete {
  border-right: none;
  animation: none;
}

/* 漸變文字動畫 */
.fade-in-text {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s linear infinite;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

.hero h2 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  animation: fadeInUp 1s ease;
  opacity: 0;
  transform: translateY(30px);
}

.hero h2:nth-child(2) {
  animation: slideInUp 1s ease 0.7s forwards;
}

.hero h2:nth-child(3) {
  animation: slideInUp 1s ease 0.9s forwards;
}

.hero h2:nth-child(4) {
  animation: slideInUp 1s ease 1.1s forwards;
}

.hero h2:nth-child(5) {
  animation: slideInUp 1s ease 1.3s forwards;
}

.hero-cta {
  animation: fadeInUp 1s ease 0.4s;
  animation-fill-mode: both;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInUp 1s ease 1.5s forwards;
}

.cta-button {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
  width: 300px;
  height: 300px;
}

.cta-button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow-xl);
  background: var(--primary-light);
}

.cta-button span {
  position: relative;
  z-index: 1;
}

/* 磁性按鈕效果 */
.magnetic-button {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Main Content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.section {
  margin-bottom: 12rem;
  scroll-margin-top: 6rem;
  position: relative;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}

.section.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Section Elements Animation */
.section .content-text,
.section .content-visual,
.work-item,
.reflection-block {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.section.animate .content-text,
.section.animate .content-visual,
.section.animate .work-item,
.section.animate .reflection-block {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure tab-content is always visible when active, regardless of parent section animation */
.tab-content.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.section.animate .content-text { transition-delay: 0.2s; }
.section.animate .content-visual { transition-delay: 0.4s; }
.section.animate .work-item:nth-child(1) { transition-delay: 0.2s; }
.section.animate .work-item:nth-child(2) { transition-delay: 0.4s; }
.section.animate .work-item:nth-child(3) { transition-delay: 0.6s; }
.section.animate .reflection-block:nth-child(1) { transition-delay: 0.2s; }
.section.animate .reflection-block:nth-child(2) { transition-delay: 0.4s; }
.section.animate .reflection-block:nth-child(3) { transition-delay: 0.6s; }

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 6rem;
  position: relative;
}

.section-header::before {
  content: "";
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.section-icon:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.section-icon svg {
  width: 36px;
  height: 36px;
}

h2 {
  font-size: 3rem;
  color: var(--dark);
  font-weight: 800;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.3rem;
  color: var(--gray-500);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* Company Section - Split Layout */
#company {
  background: var(--gray-50);
  padding: 6rem 0;
  margin: 0 -2rem;
  border-radius: 2rem;
}

#company .section-content {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 6rem;
  align-items: center;
  max-width: 1400px;
  margin-top: -3rem;
  padding: 0 2rem;
}

#company .content-text {
  position: relative;
}

#company .content-text::before {
  content: "";
  position: absolute;
  left: -1.8rem;
  top: 0;
  width: 4px;
  height: 95%;
  background: var(--primary);
  border-radius: 2px;
}

#company .content-text p {
  font-size: 1.2rem;
  line-height: 1.9;
  margin-bottom: 2rem;
  text-align: justify;
}

#company .content-visual {
  position: relative;
}

#company .company-image {
  border-radius: 2rem;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}

#company .company-image:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-xl);
}

#company .company-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
}

#company .company-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), transparent);
  pointer-events: none;
}

/* Company Environment Subsection */
.company-environment {
  margin-top: 6rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

.subsection-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.subsection-header h3 {
  font-size: 2.2rem;
  color: var(--dark);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.subsection-divider {
  width: 80px;
  height: 3px;
  background: var(--primary);
  margin: 0 auto;
  border-radius: 2px;
  position: relative;
}

.subsection-divider::before,
.subsection-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}

.subsection-divider::before {
  left: -20px;
}

.subsection-divider::after {
  right: -20px;
}

.environment-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.environment-text {
  position: relative;
  padding-right: 2rem;
}

.environment-text::before {
  content: "";
  position: absolute;
  left: -1.8rem;
  top: 0;
  width: 4px;
  height: 80%;
  background: linear-gradient(to bottom, var(--primary), var(--primary-light));
  border-radius: 2px;
}

.environment-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  text-align: justify;
  color: var(--gray-600);
}

.environment-images {
  width: 70%;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 100%;
}

.image-placeholder {
  margin-left: 9rem;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.image-placeholder:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.placeholder-content {
  width: 100%;
  height: 100%;
}

.placeholder-content img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 1rem;
  max-width: 100%;
}

/* Work Section - Grid Layout */
#work {
  margin-top: 5rem;
  position: relative;
}

#work .section-content {
  margin-top: 4rem;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 4rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.work-item {
  background: var(--white);
  border-radius: 1.5rem;
  padding: 4rem;
  position: relative;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  perspective: 1000px;
}

/* 3D 卡片翻轉效果 */
.card-3d {
  background: transparent;
  padding: 0;
  height: auto;
  min-height: 300px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.card-3d:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 1.5rem;
  padding: 4rem;
  background: var(--white);
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  box-sizing: border-box;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.card-back-content h3 {
  color: white;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: center;
}

.card-back-content p {
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-size: 1.1rem;
}

.work-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: var(--primary);
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transform-origin: top;
  transition: var(--transition);
}

.work-item:hover::before {
  transform: scaleY(1);
}

.work-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.work-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.work-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-right: 2rem;
  line-height: 1;
  min-width: 80px;
}

.work-content {
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.work-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.work-content p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-600);
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Learning Section */
#learning {
  background: var(--gray-50);
  padding: 6rem 0;
  margin: 0 -2rem;
  position: relative;
  border-radius: 2rem;
}

#learning::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
}

#learning .section-content {
  display: block;
  max-width: 1400px;
  margin-top: -2rem;
  padding: 0 2rem;
}

#learning .content-text {
  position: relative;
}

#learning .content-text p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 2.5rem;
  text-align: justify;
  position: relative;
}

/* Reflection Section */
#reflection {
  margin-top: 5rem;
  position: relative;
}

#reflection .section-content {
  margin-top: 4rem;
}

.reflection-intro {
  text-align: center;
  margin-bottom: 6rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  background: var(--white);
  border-radius: 2rem;
  padding: 4rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
}

.reflection-intro h3 {
  font-size: 2.2rem;
  color: var(--dark);
  margin-bottom: 1.5rem;
  font-weight: 700;
  position: relative;
}

.reflection-intro h3::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

.reflection-intro p {
  font-size: 1.3rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 0;
}

.reflection-content {
  max-width: 1200px;
  margin: 0 auto;
}

.reflection-block {
  background: var(--white);
  border-radius: 1.5rem;
  padding: 3rem;
  margin-bottom: 3rem;
  position: relative;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-100);
  transition: var(--transition);
}

.reflection-block:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.reflection-block:nth-child(even) {
  margin-left: auto;
  margin-right: 0;
  max-width: 85%;
}

.reflection-block:nth-child(odd) {
  margin-left: 0;
  margin-right: auto;
  max-width: 85%;
}

.reflection-header {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  position: relative;
}

.reflection-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary);
  margin-right: 2rem;
  line-height: 1;
  min-width: 80px;
}

.reflection-title {
  flex: 1;
}

.reflection-title h4 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
  line-height: 1.2;
}

.reflection-subtitle {
  font-size: 1rem;
  color: var(--gray-500);
  margin-top: 0.5rem;
  font-weight: 500;
}

.reflection-text {
  padding-left: 6rem;
  position: relative;
}

.reflection-text::before {
  content: "";
  position: absolute;
  left: 2rem;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--primary);
  border-radius: 1px;
}

.reflection-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  text-align: justify;
}

.reflection-text p:last-child {
  margin-bottom: 0;
}

.reflection-highlight {
  background: var(--dark);
  margin: 6rem 0;
  padding: 5rem;
  border-radius: 2rem;
  position: relative;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.reflection-highlight::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite;
}

.reflection-highlight-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.reflection-highlight h4 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--white);
  font-weight: 700;
}

.reflection-highlight p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  margin: 0;
  text-align: justify;
}

/* Key Insights Grid */
.progress-indicator {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 2rem;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  border: 1px solid var(--gray-100);
}

.progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--gray-300);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.progress-dot:hover {
  background-color: var(--gray-500);
  transform: scale(1.2);
}

.progress-dot.active {
  background: var(--primary);
  transform: scale(1.4);
  box-shadow: var(--shadow);
}

.progress-dot:hover .tooltip {
  opacity: 1;
  transform: translateX(-0.75rem);
}

.tooltip {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateX(1rem) translateY(-50%);
  background-color: var(--dark);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 0;
  margin-top: 6rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  margin-bottom: 2rem;
}

.footer-logo .logo-img {
  height: 45px;
  filter: brightness(0) invert(1);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section 動畫 */
@keyframes fadeInHero {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  background: var(--primary-light);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  main {
    padding: 5rem 1.5rem;
  }

  #company .section-content {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  #company .content-text p {
    font-size: 1.15rem;
  }

  #learning .section-content {
    padding: 0 1.5rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .environment-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .reflection-intro {
    padding: 3.5rem 2.5rem;
  }

  .tech-content {
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .progress-indicator {
    display: none;
  }

  .hero {
    background-attachment: scroll;
  }

  .hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .hero h2 {
    font-size: 1.2rem;
  }

  .hero-content {
    padding: 0 1.5rem;
  }

  .section {
    margin-bottom: 6rem;
  }

  .section-header {
    margin-bottom: 4rem;
  }

  h2 {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1.2rem;
  }

  #company,
  #learning {
    padding: 4rem 0;
    margin: 0 -1.5rem;
  }

  #company .section-content,
  #learning .section-content {
    padding: 0 1.5rem;
  }

  #company .content-text p {
    font-size: 1.1rem;
  }

  .work-grid {
    gap: 2rem;
  }

  .work-item {
    padding: 2rem;
  }

  .card-front,
  .card-back {
    padding: 2rem;
  }

  .work-header {
    flex-direction: column;
    gap: 1rem;
  }

  .work-number {
    font-size: 2.5rem;
    margin-right: 0;
    min-width: auto;
  }

  .work-content {
    width: 100%;
  }

  .work-content h3 {
    font-size: 1.5rem;
    line-height: 1.4;
  }

  .work-content p {
    font-size: 1rem;
  }

  .card-back-content h3 {
    font-size: 1.5rem;
  }

  .card-back-content p {
    font-size: 1rem;
  }

  .reflection-intro {
    padding: 3rem 2rem;
  }

  .reflection-intro h3 {
    font-size: 2rem;
  }

  .reflection-block {
    padding: 2.5rem;
  }

  .reflection-block:nth-child(even),
  .reflection-block:nth-child(odd) {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .reflection-number {
    font-size: 3rem;
    margin-right: 1rem;
    min-width: 60px;
  }

  .reflection-title h4 {
    font-size: 1.6rem;
  }

  .reflection-text {
    padding-left: 4rem;
  }

  .reflection-text::before {
    left: 1rem;
  }

  .reflection-highlight {
    padding: 3rem 2rem;
    margin: 4rem 0;
  }

  .reflection-highlight h4 {
    font-size: 2rem;
  }

  .reflection-highlight p {
    font-size: 1.1rem;
  }

  .insights-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  main {
    padding: 4rem 1.5rem;
  }

  .nav-content {
    padding: 0 1.5rem;
  }

  .company-environment {
    margin-top: 4rem;
    padding: 0 1.5rem;
  }

  .subsection-header {
    margin-bottom: 3rem;
  }

  .subsection-header h3 {
    font-size: 1.8rem;
  }

  .environment-text p {
    font-size: 1.05rem;
  }

  .image-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .image-placeholder {
    margin-left: 0;
  }

  .environment-text::before {
    display: none;
  }

  .tab-buttons {
    gap: 0.75rem;
  }

  .tab-button {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
  }

  .tech-item {
    padding: 2rem;
  }

  .tech-item h3 {
    font-size: 1.6rem;
  }

  .tech-text p {
    font-size: 1.1rem;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

@media (max-width: 992px) {
  #company .section-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  #company .content-text p {
    font-size: 1.1rem;
  }

  .environment-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .environment-images {
    width: 100%;
  }

  .image-placeholder {
    margin-left: 0;
  }

  .tech-content {
    flex-direction: column;
    gap: 2rem;
  }

  .tech-icon {
    width: 100%;
    max-width: 400px;
    min-width: auto;
  }

  .tech-text {
    width: 100%;
  }

  .reflection-intro {
    padding: 3rem 2rem;
  }

  .reflection-intro h3 {
    font-size: 2rem;
  }

  .reflection-block {
    padding: 2.5rem;
  }

  .tab-buttons {
    gap: 0.75rem;
  }

  .tab-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero h2 {
    font-size: 1rem;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .cta-button {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .section-icon {
    width: 60px;
    height: 60px;
  }

  .section-icon svg {
    width: 28px;
    height: 28px;
  }

  h2 {
    font-size: 1.75rem;
  }

  .section-header {
    margin-bottom: 3rem;
  }

  .section-subtitle {
    font-size: 1.1rem;
  }

  #company,
  #learning {
    padding: 3rem 0;
    margin: 0 -1rem;
    border-radius: 1rem;
  }

  #company .section-content,
  #learning .section-content {
    padding: 0 1rem;
    margin-top: -1rem;
  }

  #company .content-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  #company .content-text::before {
    display: none;
  }

  .company-environment {
    padding: 0 1rem;
    margin-top: 3rem;
  }

  .subsection-header h3 {
    font-size: 1.5rem;
  }

  .environment-text p {
    font-size: 1rem;
  }

  .work-item {
    padding: 1.5rem;
  }

  .card-3d {
    min-height: auto;
  }

  .card-front,
  .card-back {
    padding: 1.5rem;
    position: relative;
    height: auto;
    min-height: 200px;
  }

  .card-inner {
    height: auto;
  }

  .card-3d:hover .card-inner {
    transform: none;
  }

  .work-header {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .work-number {
    font-size: 2rem;
    margin-right: 0;
    min-width: auto;
    align-self: flex-start;
  }

  .work-content {
    width: 100%;
    flex: 1;
  }

  .work-content h3 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }

  .work-content p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .card-back {
    position: relative;
    transform: none;
    display: block;
    margin-top: 1rem;
  }

  .card-back-content {
    padding: 1rem;
  }

  .card-back-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
  }

  .card-back-content p {
    font-size: 0.95rem;
  }

  .tab-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tab-button {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }

  .tech-item {
    padding: 1.5rem;
  }

  .tech-item h3 {
    font-size: 1.3rem;
    margin-bottom: 1.25rem;
  }

  .tech-text p {
    font-size: 1rem;
  }

  .tech-content {
    padding: 1rem;
    gap: 1.5rem;
  }

  .tech-icon {
    width: 100%;
    max-width: 280px;
    min-width: auto;
  }

  .image-placeholder {
    margin-left: 0;
  }

  .environment-images {
    width: 100%;
  }

  .reflection-intro {
    padding: 2rem 1.5rem;
    margin-bottom: 4rem;
  }

  .reflection-intro h3 {
    font-size: 1.75rem;
  }

  .reflection-block {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .reflection-number {
    font-size: 2.5rem;
    margin-right: 0.75rem;
    min-width: 50px;
  }

  .reflection-title h4 {
    font-size: 1.5rem;
  }

  .reflection-subtitle {
    font-size: 0.9rem;
  }

  .reflection-text {
    padding-left: 3rem;
  }

  .reflection-text p {
    font-size: 1rem;
  }

  .reflection-text::before {
    display: none;
  }

  .reflection-highlight {
    padding: 2rem 1.5rem;
    margin: 3rem 0;
    border-radius: 1.5rem;
  }

  .reflection-highlight h4 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .reflection-highlight p {
    font-size: 1rem;
  }

  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }

  .work-item:hover {
    transform: translateY(-5px);
  }

  .nav-content {
    padding: 0 1rem;
  }

  .logo-img {
    height: 40px;
  }

  .navbar.scrolled .logo-img {
    height: 36px;
  }

  .mobile-menu {
    width: 80%;
    padding: 5rem 1.5rem 2rem;
  }

  .mobile-menu a {
    font-size: 1.1rem;
    padding: 1rem 0;
  }

  main {
    padding: 3rem 1rem;
  }

  .section {
    margin-bottom: 4rem;
  }

  p {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* Floating Elements */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
  }
}

/* Tab Styles */
.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-button {
    padding: 1rem 2rem;
    border: none;
    background: var(--white);
    color: var(--gray-700);
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.tab-button:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.tab-button.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.tab-content {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.3s ease;
}

/* Tech List Styles */
.tech-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.tech-item {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tech-item h3 {
    color: var(--dark);
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.tech-item h3::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.tech-content {
    display: flex;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
    min-height: 500px;
    padding: 1.5rem;
}

.tech-text {
    flex: 2;
    min-width: 0;
}

.tech-text p {
    color: var(--gray-700);
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 0;
    text-align: justify;
}

.tech-icon {
    flex: 1;
    min-width: 500px;
    height: 500px;
    background: var(--gray-50);
    border-radius: 1.5rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.tech-icon:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.tech-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    transition: transform 0.3s ease;
}

.tech-icon:hover img {
    transform: scale(1.05);
}

@media (max-width: 1400px) {
    .tech-content {
        gap: 2rem;
    }

    .tech-icon {
        min-width: 450px;
        height: 450px;
    }
}

@media (max-width: 1200px) {
    .tech-icon {
        min-width: 400px;
        height: 400px;
    }
}

@media (max-width: 992px) {
    .tech-content {
        gap: 1.5rem;
        min-height: auto;
    }

    .tech-icon {
        min-width: 350px;
        height: 350px;
    }
}

@media (max-width: 768px) {
    .tech-item {
        padding: 1.5rem;
    }

    .tech-item h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .tech-content {
        flex-direction: column-reverse;
        align-items: center;
        gap: 2rem;
        min-height: auto;
    }

    .tech-text {
        width: 100%;
    }

    .tech-icon {
        width: 280px;
        height: 280px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .tech-icon {
        width: 200px;
        height: 200px;
    }
}
