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

:root {
  --bg: #0a0b10;
  --bg-alt: #0f1118;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #6c63ff;
  --accent2: #00d4aa;
  --accent3: #ff6584;
  --text: #e8eaf0;
  --text-muted: #8892a4;
  --text-dim: #555d6e;
  --gradient: linear-gradient(135deg, #6c63ff 0%, #00d4aa 100%);
  --gradient2: linear-gradient(135deg, #ff6584 0%, #6c63ff 100%);
  --font: 'Inter', 'Noto Sans TC', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(108, 99, 255, 0.2);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: url('background.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 16, 0.65);
  /* Subtle dark overlay for readability */
  z-index: -1;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

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

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

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: var(--transition);
}

.card:hover {
  background: var(--surface-hover);
  border-color: rgba(108, 99, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-link.nav-cta {
  background: var(--gradient);
  color: #fff;
  -webkit-text-fill-color: #fff;
}

.nav-link.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  /* Make orbs more subtle with the new background */
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6c63ff, transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #00d4aa, transparent 70%);
  bottom: -5%;
  right: -5%;
  animation-delay: -3s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #ff6584, transparent 70%);
  top: 40%;
  left: 60%;
  animation-delay: -5s;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 28px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.3), 0 0 60px rgba(108, 99, 255, 0.4);
  animation: pulse-ring 3s ease-in-out infinite;
}

@keyframes pulse-ring {

  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.3), 0 0 60px rgba(108, 99, 255, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(108, 99, 255, 0.15), 0 0 80px rgba(108, 99, 255, 0.5);
  }
}

.avatar-initials {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
}

.status-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #22c55e;
  border-radius: 50%;
  border: 3px solid var(--bg);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.hero-greeting {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.hero-name {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 800;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--text-muted);
  margin-bottom: 24px;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.hero-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.badge {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px rgba(108, 99, 255, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(108, 99, 255, 0.5);
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  backdrop-filter: blur(8px);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease-in-out infinite;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}

@keyframes bounce {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ── Sections ── */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-contact {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(108, 99, 255, 0.05) 100%);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 48px;
  line-height: 1.2;
}

.section-title span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin-bottom: 56px;
  line-height: 1.8;
}

.sub-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 28px;
  margin-top: 56px;
  color: var(--text);
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  margin-bottom: 0;
}

.about-bio {
  line-height: 1.9;
}

.about-bio p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.about-bio p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  text-align: center;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.tl-dot {
  position: absolute;
  left: -30px;
  top: 24px;
  width: 14px;
  height: 14px;
  background: var(--gradient);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.3);
}

.tl-content {
  padding: 24px;
}

.tl-year {
  font-size: 0.78rem;
  color: var(--accent2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tl-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 8px 0 4px;
}

.tl-org {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}

.tl-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── Skills ── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.skill-category h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
}

.tag:hover {
  background: rgba(108, 99, 255, 0.25);
}

/* ── Interests ── */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.interest-card {
  text-align: center;
  padding: 36px 28px;
}

.interest-icon {
  font-size: 2.8rem;
  margin-bottom: 20px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.interest-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.interest-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

/* ── Career Roadmap ── */
.roadmap {
  display: flex;
  flex-direction: column;
  position: relative;
}

.roadmap::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2), var(--accent3));
  transform: translateX(-50%);
}

.roadmap-item {
  display: flex;
  width: 50%;
  margin-bottom: 40px;
  position: relative;
}

.roadmap-left {
  align-self: flex-start;
  padding-right: 48px;
  justify-content: flex-end;
}

.roadmap-right {
  align-self: flex-end;
  padding-left: 48px;
  justify-content: flex-start;
  margin-left: 50%;
}

.roadmap-content {
  flex: 1;
  max-width: 440px;
}

.roadmap-phase {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 4px;
}

.roadmap-time {
  font-size: 0.82rem;
  color: var(--accent2);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.roadmap-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.roadmap-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roadmap-content ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.roadmap-content ul li::before {
  content: '▸';
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.roadmap-connector {
  position: absolute;
  right: -7px;
  top: 28px;
  width: 14px;
  height: 14px;
  background: var(--gradient);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.2);
}

.roadmap-right .roadmap-connector {
  left: -7px;
  right: auto;
}

/* ── Values ── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.value-card {
  text-align: center;
  padding: 36px 24px;
}

.value-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 16px;
}

.value-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.value-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ── Contact ── */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  color: var(--text);
  padding: 24px 28px;
}

.contact-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Contact Form Section ── */
.section-contact-form {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(108, 99, 255, 0.05) 100%);
}

.contact-container {
  padding: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 4px;
}

.form-group input,
.form-group textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
}

.btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  border: none;
}

.loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-status {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 8px;
  min-height: 20px;
}

.form-status.success {
  color: var(--accent2);
}

.form-status.error {
  color: var(--accent3);
}

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

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 11, 16, 0.97);
    backdrop-filter: blur(20px);
    padding: 24px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
  }

  .hamburger {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .roadmap::before {
    left: 16px;
  }

  .roadmap-item {
    width: 100%;
    padding-left: 48px !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
  }

  .roadmap-connector {
    left: 9px !important;
    right: auto !important;
  }

  .roadmap-content {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .interests-grid {
    grid-template-columns: 1fr;
  }
}