/* === Reset & Base === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #faf6f1;
  --bg-alt: #fefcf9;
  --surface: rgba(255, 253, 250, 0.6);
  --border: rgba(160, 130, 100, 0.1);
  --text: #3d3229;
  --text-muted: #8a7b6b;
  --accent: #b8865a;
  --accent2: #c9976b;
  --accent3: #d4a87c;
  --accent-warm: #a67548;
  --gradient: linear-gradient(135deg, #d4a87c, #c49068, #b87d55, #a66d45);
  --gradient-soft: linear-gradient(135deg, rgba(212,168,124,0.18), rgba(196,144,104,0.12), rgba(184,125,85,0.08));
  --gradient-nav: linear-gradient(135deg, rgba(212,168,124,0.25), rgba(196,144,104,0.18), rgba(184,125,85,0.12));
  --glass: rgba(255, 253, 250, 0.6);
  --glass-border: rgba(255, 250, 240, 0.8);
  --shadow-soft: 0 2px 20px rgba(184, 134, 90, 0.08);
  --shadow-hover: 0 8px 32px rgba(184, 134, 90, 0.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-warm); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* === Navbar === */
.navbar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 100;
  width: calc(100% - 48px); max-width: 1100px;
  padding: 12px 28px;
  background: var(--gradient-nav);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(184, 134, 90, 0.1);
  transition: all 0.3s;
}
.navbar.scrolled { box-shadow: 0 4px 32px rgba(184, 134, 90, 0.15); }
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.nav-links { list-style: none; display: flex; gap: 32px; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  margin: 5px 0; transition: all 0.3s; border-radius: 2px;
}
.lang-btn {
  background: var(--gradient); color: #fff; border: none; padding: 6px 16px;
  border-radius: 10px; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  transition: all 0.3s; letter-spacing: 0.5px;
}
.lang-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* === Hero === */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 120px 24px 80px;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(212,168,124,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(196,144,104,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 85%, rgba(184,125,85,0.15) 0%, transparent 50%);
}
.hero-inner {
  position: relative; display: flex; align-items: center; gap: 60px;
  max-width: 1100px; width: 100%;
}
.hero-content { flex: 1; }
.hero-avatar {
  flex-shrink: 0; width: 260px; height: 260px; border-radius: 50%;
  overflow: hidden; border: 4px solid rgba(212,168,124,0.35);
  box-shadow: 0 8px 40px rgba(184,134,90,0.15);
  background: var(--gradient-soft);
}
.hero-avatar img {
  width: 100%; height: 100%; object-fit: cover;
}

.hero-greeting {
  color: var(--accent); font-size: 1rem; font-weight: 500;
  margin-bottom: 8px; letter-spacing: 1px;
}
.hero-name {
  font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700;
  line-height: 1.1; margin-bottom: 8px; color: var(--text);
}
.hero-name-zh { font-size: 0.5em; color: var(--text-muted); font-weight: 400; }
.hero-title {
  font-size: 1.3rem; font-weight: 500;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 16px;
}
.hero-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 540px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; }

.btn {
  padding: 12px 28px; border-radius: 12px; font-size: 0.95rem; font-weight: 600;
  transition: all 0.3s; cursor: pointer; display: inline-block;
}
.btn-primary {
  background: var(--gradient); color: #fff; border: none;
  box-shadow: 0 4px 16px rgba(184, 134, 90, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(184, 134, 90, 0.25); color: #fff; }
.btn-outline {
  border: 1.5px solid rgba(0,0,0,0.1); color: var(--text); background: var(--glass);
  backdrop-filter: blur(8px);
}
.btn-outline:hover { border-color: var(--accent2); color: var(--accent); }

.hero-stats { display: flex; gap: 48px; }
.stat-number {
  display: block; font-size: 1.8rem; font-weight: 700;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); }

.scroll-indicator {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-indicator span { font-size: 0.75rem; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }
.scroll-line { width: 1px; height: 40px; background: var(--gradient); animation: scrollPulse 2s infinite; }
@keyframes scrollPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

/* === Sections === */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: 2rem; font-weight: 700; margin-bottom: 48px; position: relative; display: inline-block;
}
.section-title::after {
  content: ''; position: absolute; bottom: -8px; left: 0;
  width: 48px; height: 3px; background: var(--gradient); border-radius: 2px;
}
.section-subtitle { color: var(--text-muted); margin-top: -32px; margin-bottom: 32px; }

/* === About === */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; }
.skills-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.skill-tag {
  padding: 6px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 500;
  background: var(--glass); border: 1px solid var(--border); color: var(--text-muted);
  backdrop-filter: blur(8px); transition: all 0.3s;
}
.skill-tag:hover {
  border-color: var(--accent2); color: var(--accent);
  background: rgba(212, 168, 124, 0.12);
}

.highlight-card {
  background: var(--glass); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; margin-bottom: 16px; transition: all 0.3s;
  backdrop-filter: blur(12px); box-shadow: var(--shadow-soft);
}
.highlight-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.highlight-icon { font-size: 1.5rem; margin-bottom: 8px; }
.highlight-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.highlight-card p { font-size: 0.85rem; color: var(--text-muted); }

/* === Timeline === */
.timeline { position: relative; padding-left: 32px; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--accent2), rgba(196,144,104,0.3));
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-marker {
  position: absolute; left: -32px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent2);
  z-index: 1;
}
.timeline-item:first-child .timeline-marker {
  background: var(--gradient); border: none;
  box-shadow: 0 0 12px rgba(184, 134, 90, 0.2);
}
.timeline-content {
  background: var(--glass); border: 1px solid var(--border); border-radius: 16px;
  padding: 24px; transition: all 0.3s;
  backdrop-filter: blur(12px); box-shadow: var(--shadow-soft);
}
.timeline-content:hover { box-shadow: var(--shadow-hover); }
.timeline-header { margin-bottom: 12px; }
.timeline-header h3 { font-size: 1.15rem; font-weight: 700; }
.timeline-role { display: block; color: var(--accent); font-size: 0.9rem; font-weight: 500; }
.timeline-date { font-size: 0.8rem; color: var(--text-muted); }
.timeline-details { list-style: none; }
.timeline-details li {
  position: relative; padding-left: 16px; margin-bottom: 8px;
  font-size: 0.9rem; color: var(--text-muted);
}
.timeline-details li::before {
  content: '▸'; position: absolute; left: 0; color: var(--accent2);
}

/* === Projects === */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.project-card {
  background: var(--glass); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; transition: all 0.3s; position: relative;
  backdrop-filter: blur(12px); box-shadow: var(--shadow-soft);
}
.project-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.project-card.featured {
  background: linear-gradient(135deg, rgba(212,168,124,0.1), rgba(196,144,104,0.06));
  border-color: rgba(212,168,124,0.3);
}
.project-badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--gradient); color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 4px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: 1px;
}
.project-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.project-subtitle { font-size: 0.8rem; color: var(--accent); margin-bottom: 12px; }
.project-card > p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.project-tags span {
  padding: 4px 10px; border-radius: 8px; font-size: 0.75rem;
  background: rgba(212, 168, 124, 0.15); color: var(--accent); font-weight: 500;
}
.project-link { font-size: 0.9rem; font-weight: 600; }
.project-links { display: flex; gap: 16px; flex-wrap: wrap; }
.project-links .project-link { padding: 6px 14px; border-radius: 8px; background: rgba(212,168,124,0.1); font-size: 0.85rem; transition: all 0.2s; }
.project-links .project-link:hover { background: rgba(212,168,124,0.2); }

/* === Sharing === */
.sharing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.sharing-block {
  background: var(--glass); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; backdrop-filter: blur(12px); box-shadow: var(--shadow-soft);
}
.sharing-block h3 { font-size: 1.1rem; margin-bottom: 16px; }
.sharing-block ul { list-style: none; }
.sharing-block li {
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; color: var(--text-muted);
}
.sharing-block li:last-child { border-bottom: none; }
.creative-card h4 { font-size: 0.95rem; margin-bottom: 8px; }
.creative-card p { font-size: 0.85rem; color: var(--text-muted); }

/* === Blog === */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.blog-card {
  display: block; background: var(--glass); border: 1px solid var(--border);
  border-radius: 16px; padding: 28px; transition: all 0.3s;
  backdrop-filter: blur(12px); box-shadow: var(--shadow-soft);
}
.blog-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.blog-date { font-size: 0.8rem; color: var(--accent); font-weight: 500; }
.blog-card h3 { font-size: 1.05rem; margin: 8px 0; color: var(--text); }
.blog-card p { font-size: 0.85rem; color: var(--text-muted); }

/* === Contact === */
.contact-desc { color: var(--text-muted); margin-bottom: 32px; max-width: 480px; }
.contact-links { display: flex; gap: 16px; flex-wrap: wrap; }
.contact-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--glass); border: 1px solid var(--border); border-radius: 16px;
  padding: 16px 24px; transition: all 0.3s; color: var(--text-muted);
  backdrop-filter: blur(12px); box-shadow: var(--shadow-soft);
}
.contact-card:hover { box-shadow: var(--shadow-hover); color: var(--accent); transform: translateY(-2px); }
.contact-card svg { flex-shrink: 0; }

/* === Footer === */
.footer { padding: 32px 0; text-align: center; border-top: 1px solid var(--border); }
.footer p { font-size: 0.85rem; color: var(--text-muted); }

/* === Floating gradient orbs === */
.orb {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: -1;
  filter: blur(80px); opacity: 0.35; animation: orbFloat 20s ease-in-out infinite;
}
.orb-1 { width: 400px; height: 400px; background: rgba(212,168,124,0.35); top: 10%; left: -5%; animation-delay: 0s; }
.orb-2 { width: 350px; height: 350px; background: rgba(196,144,104,0.25); top: 60%; right: -5%; animation-delay: -7s; }
.orb-3 { width: 300px; height: 300px; background: rgba(184,125,85,0.2); bottom: 10%; left: 30%; animation-delay: -14s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -20px) scale(1.05); }
  50% { transform: translate(-20px, 30px) scale(0.95); }
  75% { transform: translate(20px, 20px) scale(1.02); }
}

/* === Animations === */
.fade-in { opacity: 0; transform: translateY(24px); transition: all 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* === Responsive === */
@media (max-width: 768px) {
  .navbar { width: calc(100% - 32px); padding: 10px 20px; top: 8px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 260px; height: 100vh;
    background: rgba(250, 246, 241, 0.95); backdrop-filter: blur(20px);
    flex-direction: column; padding: 80px 32px;
    gap: 24px; transition: right 0.3s; border-left: 1px solid var(--border);
  }
  .nav-links.active { right: 0; }
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 32px; }
  .hero-avatar { width: 180px; height: 180px; }
  .hero-stats { justify-content: center; gap: 24px; }
  .hero-cta { justify-content: center; }
  .about-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .sharing-grid { grid-template-columns: 1fr; }
  .contact-links { flex-direction: column; }
  .hero { padding: 100px 24px 60px; }
  .scroll-indicator { display: none; }
}
