/* modern.css - 現代化的UI設計 */
:root {
  --primary-color: #2563eb;
  --secondary-color: #1e293b;
  --accent-color: #f97316;
  --light-bg: #f8fafc;
  --dark-bg: #1e293b;
  --text-color: #334155;
  --light-text: #fff;
  --border-radius: 10px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

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

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Roboto', 'Noto Sans TC', sans-serif;
  color: var(--text-color);
  background: var(--light-bg);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-color);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}

p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 導航欄 */
.navbar {
  background-color: rgba(30, 41, 59, 0.98);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
}

.logo {
  display: flex;
  align-items: center;
  color: var(--light-text);
}

.logo img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin-right: 0.8rem;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.logo h1 {
  font-size: 1.5rem;
  margin-bottom: 0;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2.5rem;
}

.nav-links a {
  color: var(--light-text);
  font-weight: 500;
  position: relative;
  font-size: 1.05rem;
  opacity: 0.85;
  transition: var(--transition);
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-color);
  transition: var(--transition);
}

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

.nav-links a.active {
  opacity: 1;
}

.burger {
  display: none;
  cursor: pointer;
}

.burger div {
  width: 25px;
  height: 3px;
  background-color: var(--light-text);
  margin: 5px;
  transition: var(--transition);
}

/* 主要內容 */
.main-content {
  padding: 2rem 0 0;
}

/* 英雄區塊 */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), #1e40af);
  color: var(--light-text);
  border-radius: var(--border-radius);
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><path fill="rgba(255, 255, 255, 0.05)" d="M41.3,-49C54.4,-36.1,66.6,-24.6,71.2,-10.1C75.8,4.4,72.7,21.9,63.3,34.2C53.9,46.5,38.2,53.7,21.9,60.1C5.7,66.5,-11.1,72.1,-25.1,68.5C-39.1,64.9,-50.4,52,-59.3,37.5C-68.3,22.9,-74.9,6.8,-73.2,-8.5C-71.5,-23.8,-61.5,-38.4,-48.3,-51.4C-35.1,-64.5,-18.8,-76,-2.7,-73.2C13.5,-70.3,28.3,-52.9,41.3,-49Z" transform="translate(100 100)" /></svg>') no-repeat center center;
  opacity: 0.7;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.hero p {
  font-size: 1.35rem;
  max-width: 700px;
  font-weight: 400;
  z-index: 2;
}

/* 個人資料與技能區域重組 */
.profile {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 4rem;
  align-items: start;
}

.profile-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-image {
  width: 220px;
  height: 220px;
  border-radius: 15px;
  box-shadow: var(--box-shadow);
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 5px solid white;
  transition: transform 0.3s ease;
}

.profile-image:hover {
  transform: scale(1.02);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
  width: 100%;
}

.social-links a {
  display: flex;
  align-items: center;
  padding: 0.7rem 1rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  font-weight: 500;
}

.social-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.social-links i {
  margin-right: 0.8rem;
  font-size: 1.2rem;
}

.profile-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.contact-info h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  position: relative;
  padding-bottom: 0.6rem;
}

.contact-info h2:after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 0;
}

.contact-info p {
  line-height: 1.7;
  margin-bottom: 0;
}

/* 專案卡片 */
.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.6rem;
  color: var(--secondary-color);
}

.section-title:after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 0;
}

/* 專案卡片 */
.featured-projects {
  margin-bottom: 4rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.project-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.03);
}

.project-content {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--secondary-color);
}

.project-content p {
  color: #64748b;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-link {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  align-self: flex-start;
}

.project-link:hover {
  background-color: var(--accent-color);
  color: #fff;
  transform: translateY(-2px);
}

/* 技能部分 */
.skills {
  margin-bottom: 4rem;
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.6rem;
  color: var(--secondary-color);
}

.section-title:after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 0;
}

.skill-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background-color: rgba(37, 99, 235, 0.03);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(37, 99, 235, 0.1);
  transition: all 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.skill-category h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  position: relative;
  padding-bottom: 0.5rem;
}

.skill-category h3:after {
  content: '';
  position: absolute;
  width: 30px;
  height: 2px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 0;
}

.skill-list {
  list-style: none;
}

.skill-list li {
  margin-bottom: 0.7rem;
  position: relative;
  padding-left: 1.5rem;
}

.skill-list li:before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* 經歷部分 */
.experience {
  margin-bottom: 3rem;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline:before {
  content: '';
  position: absolute;
  width: 2px;
  background-color: #e0e0e0;
  top: 0;
  bottom: 0;
  left: 50px;
}

.timeline-item {
  padding: 1rem 0 1rem 5rem;
  position: relative;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  background-color: var(--primary-color);
  border-radius: 50%;
  position: absolute;
  left: 41px;
  top: 20px;
  z-index: 1;
}

.timeline-content {
  background-color: #fff;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.timeline-content h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.timeline-content .date {
  color: #999;
  margin-bottom: 1rem;
  font-style: italic;
}

/* 聯絡部分 */
.contact {
  background-color: #fff;
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
}

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

.contact-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-links i {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* 頁尾 */
.footer {
  background-color: var(--dark-bg);
  color: var(--light-text);
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 響應式設計 */
@media screen and (max-width: 992px) {
  .profile {
    grid-template-columns: 1fr;
  }
  
  .profile-left {
    margin-bottom: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media screen and (max-width: 768px) {
  .nav-links {
    position: fixed;
    right: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--dark-bg);
    width: 100%;
    text-align: center;
    transition: var(--transition);
    padding: 2rem 0;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    right: 0;
  }

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

  .burger {
    display: block;
  }

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

  .hero p {
    font-size: 1.2rem;
  }
  
  .project-card img {
    height: 180px;
  }
  
  .social-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .social-links a {
    width: auto;
  }
}

@media screen and (max-width: 480px) {
  .hero {
    padding: 4rem 1rem;
  }
  
  .hero h1 {
    font-size: 2.3rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .profile-image {
    width: 180px;
    height: 180px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}
