﻿/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a1a;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
code { font-family: 'JetBrains Mono', monospace; background: rgba(0,0,0,0.06); padding: 0.15em 0.4em; border-radius: 4px; font-size: 0.9em; }
img { display: block; max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Video Background ===== */
.video-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; overflow: hidden; }
.video-bg video { width: 100%; height: 100%; object-fit: cover; }
.video-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.65) 0%, rgba(240,240,250,0.75) 100%); z-index: -1; }

/* ===== Liquid Glass ===== */
.glass {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.glass-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  padding: 1.8rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  opacity: 0;
  transform: translateY(24px);
}
.glass-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.7);
}
.glass-panel {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.glass-btn {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  padding: 0.7rem 1.6rem;
  color: #1a1a1a;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.glass-btn:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0;
}
.nav-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #1a1a1a;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-links a {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
  color: rgba(0,0,0,0.6);
}
.nav-links a:hover,
.nav-links a.active { color: #1a1a1a; background: rgba(0,0,0,0.05); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: #1a1a1a; border-radius: 2px; transition: all 0.3s ease; }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Pages ===== */
.page { display: none; min-height: 100vh; position: relative; }
.page.active { display: block; animation: pageFadeIn 0.5s ease forwards; }
@keyframes pageFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Page Header ===== */
.page-header {
  padding: 7rem 0 2rem;
  text-align: center;
}
.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}
.page-desc { color: rgba(0,0,0,0.5); font-size: 1.05rem; }

.section { padding: 1.5rem 0 4rem; }

/* ===== Hero (Home) ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
}
.hero-content {
  text-align: center;
  padding: 3.5rem 3rem;
  max-width: 540px;
  width: 100%;
}
.hero-avatar {
  margin: 0 auto 1.5rem;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.6);
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
.hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero-greeting { display: block; font-size: 1rem; color: rgba(0,0,0,0.5); font-weight: 400; margin-bottom: 0.3rem; }
.hero-name { display: block; font-size: 3.5rem; font-weight: 700; letter-spacing: 4px; color: #1a1a1a; }
.hero-subtitle { font-size: 1.15rem; color: rgba(0,0,0,0.6); margin: 0.8rem 0; }
.hero-quote { font-size: 0.95rem; color: rgba(0,0,0,0.4); font-style: italic; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.btn-primary {
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 0.75rem 1.8rem;
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
}
.btn-primary:hover { background: rgba(255,255,255,0.55); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.15);
  padding: 0.75rem 1.8rem;
  border-radius: 14px;
  transition: all 0.3s ease;
}
.btn-secondary:hover { background: rgba(255,255,255,0.3); border-color: rgba(0,0,0,0.25); transform: translateY(-2px); }

/* ===== Profile Grid (keeiv page) ===== */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.profile-card { }
.card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.card-header h2 { font-size: 1.2rem; font-weight: 600; color: #1a1a1a; }
.card-body { color: rgba(0,0,0,0.7); }
.card-body p { margin-bottom: 0.6rem; }
.card-body strong { color: #1a1a1a; }
.card-body a { color: #2563eb; text-decoration: underline; text-decoration-color: rgba(37,99,235,0.3); text-underline-offset: 3px; transition: text-decoration-color 0.2s; }
.card-body a:hover { text-decoration-color: rgba(37,99,235,0.8); }

/* Experience List */
.exp-list { display: flex; flex-direction: column; gap: 0.8rem; }
.exp-list li { padding: 0.6rem 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.exp-list li:last-child { border-bottom: none; }
.exp-title { font-size: 1rem; }

/* ===== Role Badge (管理員) ===== */
.role-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b, #ee5a24);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 8px;
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(238, 90, 36, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  vertical-align: middle;
  margin-left: 0.3rem;
}

/* Interest Tags */
.interest-tags { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.interest-tag {
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 0.55rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}
.interest-tag:hover { background: rgba(255,255,255,0.55); border-color: rgba(0,0,0,0.15); transform: translateY(-2px); }

/* ===== Sub Tabs ===== */
.sub-tabs {
  display: inline-flex;
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 2rem;
}
.sub-tab {
  padding: 0.55rem 1.4rem;
  border: none;
  background: transparent;
  color: rgba(0,0,0,0.5);
  cursor: pointer;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s ease;
  font-family: inherit;
}
.sub-tab:hover { color: rgba(0,0,0,0.8); }
.sub-tab.active { background: rgba(255,255,255,0.4); color: #1a1a1a; }
.sub-content { display: none; }
.sub-content.active { display: block; animation: pageFadeIn 0.35s ease forwards; }

/* ===== Project Cards ===== */
.project-hero { margin-bottom: 2rem; }
.project-header { display: flex; align-items: flex-start; gap: 1.2rem; margin-bottom: 1.5rem; }
.project-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(100, 140, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(140, 180, 255, 0.9);
  flex-shrink: 0;
}
.badge-game { background: rgba(255, 160, 80, 0.15); color: rgba(255, 180, 120, 0.9); }
.project-name { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.4rem; }
.project-desc { color: rgba(0,0,0,0.6); font-size: 0.95rem; line-height: 1.5; }
.project-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; color: rgba(0,0,0,0.5); font-size: 0.85rem; }
.meta-item { display: flex; align-items: center; gap: 0.4rem; }
.lang-dot { width: 10px; height: 10px; border-radius: 50%; background: #3572A5; }
.lang-dot-cs { background: #178600; }
.badge {
  background: rgba(255,200,50,0.15);
  color: rgba(255,220,100,0.9);
  padding: 0.25rem 0.7rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}
.btn-sm { padding: 0.4rem 1rem; font-size: 0.82rem; border-radius: 10px; }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.feature-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: 0.8rem; color: #1a1a1a; }
.feature-card ul { display: flex; flex-direction: column; gap: 0.4rem; }
.feature-card li { color: rgba(0,0,0,0.6); font-size: 0.88rem; padding-left: 1rem; position: relative; }
.feature-card li::before { content: ''; position: absolute; left: 0; top: 0.55em; width: 5px; height: 5px; border-radius: 50%; background: rgba(0,0,0,0.25); }

/* ===== Skills ===== */
.skills-section { margin-bottom: 2.5rem; }
.skills-section .skill-item { opacity: 1; transform: none; }
.skills-heading {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}
.skill-bars { display: flex; flex-direction: column; gap: 1.1rem; }
.skill-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.skill-item.visible { opacity: 1; transform: translateY(0); }
.skill-info { display: flex; justify-content: space-between; margin-bottom: 0.4rem; font-size: 0.9rem; }
.skill-info span:last-child { color: rgba(0,0,0,0.4); font-size: 0.82rem; }
.skill-bar {
  height: 8px;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.tech-categories { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.tech-category h4 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tag {
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(0,0,0,0.08);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: rgba(0,0,0,0.65);
  transition: all 0.2s ease;
}
.tech-tag:hover { background: rgba(255,255,255,0.55); color: #1a1a1a; }

/* ===== Footer ===== */
.footer {
  border: none;
  border-top: 1px solid rgba(0,0,0,0.06);
  border-radius: 0;
  padding: 2rem 0;
  text-align: center;
}
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.footer-name { font-weight: 600; font-size: 1rem; color: #1a1a1a; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: rgba(0,0,0,0.45); font-size: 0.88rem; transition: color 0.2s; }
.footer-links a:hover { color: #1a1a1a; }
.footer-copy { color: rgba(0,0,0,0.3); font-size: 0.78rem; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; width: 100%; flex-direction: column; padding: 1rem; background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(0,0,0,0.08); gap: 0.2rem; }
  .nav-links.active { display: flex; }
  .nav-toggle { display: flex; }
  .hero-content { padding: 2.5rem 1.5rem; }
  .hero-name { font-size: 2.5rem; letter-spacing: 2px; }
  .page-title { font-size: 2rem; }
  .profile-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .tech-categories { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}
@media (max-width: 480px) {
  .hero-name { font-size: 2rem; }
  .hero-content { padding: 2rem 1rem; }
  .glass-card { padding: 1.3rem; border-radius: 16px; }
  .page-header { padding: 6rem 0 1.5rem; }
}
