*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-deep: #dce8f5;
  --bg-mid: #b8d0ea;
  --accent: #2b6cb0;
  --accent-glow: rgba(43, 108, 176, 0.28);
  --text-primary: #1a2d42;
  --text-secondary: #4a6278;
  --card-bg: rgba(248, 252, 255, 0.9);
  --card-border: rgba(43, 108, 176, 0.2);
}

body {
  font-family: "Noto Sans TC", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  color: var(--text-primary);
  background: var(--bg-deep);
  overflow-x: hidden;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(100, 160, 220, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(70, 130, 200, 0.3) 0%, transparent 55%),
    linear-gradient(160deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(43, 108, 176, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 108, 176, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 20%, transparent 80%);
}

.card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 2.75rem 2.25rem 2.5rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 16px 40px rgba(43, 108, 176, 0.12),
    0 0 60px var(--accent-glow);
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.avatar {
  width: 150px;
  height: 150px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(43, 108, 176, 0.4);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.name {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}

.title {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.08em;
}

.mbti {
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-secondary);
  opacity: 0.72;
  letter-spacing: 0.04em;
  margin-top: 0.3rem;
}

.divider {
  width: 40px;
  height: 2px;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}

.bio {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--text-secondary);
  text-align: justify;
  text-align-last: center;
  margin-bottom: 2rem;
}

.social {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  height: 48px;
  padding: 0 1.25rem;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  transition: transform 0.25s, box-shadow 0.25s, filter 0.25s;
}

.social-link svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.social-link span {
  flex: 1;
  text-align: left;
}

.social-link--facebook {
  background: linear-gradient(135deg, #1877f2 0%, #0d5dbf 100%);
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.35);
}

.social-link--instagram {
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 45%, #8134af 100%);
  box-shadow: 0 4px 14px rgba(221, 42, 123, 0.35);
}

.social-link--youtube {
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.3);
}

.social-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.social-link--facebook:hover {
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.5);
}

.social-link--instagram:hover {
  box-shadow: 0 6px 20px rgba(221, 42, 123, 0.5);
}

.social-link--youtube:hover {
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.45);
}

.social-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.portfolio-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 0.35rem;
}

.portfolio-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.25rem;
}

.portfolio-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.portfolio-item {
  min-width: 0;
}

.portfolio-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  gap: 0.85rem;
  padding: 1.25rem 1rem;
  text-decoration: none;
  color: inherit;
  text-align: left;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 8px 24px rgba(43, 108, 176, 0.1);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.portfolio-link:hover {
  transform: translateY(-3px);
  border-color: rgba(43, 108, 176, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 12px 32px rgba(43, 108, 176, 0.18);
}

.portfolio-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.portfolio-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-icon svg {
  width: 26px;
  height: 26px;
}

.portfolio-icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.portfolio-icon--coffee {
  background: linear-gradient(135deg, #6f4e37 0%, #4a3228 100%);
  color: #f5e6d3;
  box-shadow: 0 4px 12px rgba(74, 50, 40, 0.3);
}

.portfolio-icon--wheel {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fffbeb;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}

.portfolio-icon--clinic {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #ecfdf5;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35);
}

.portfolio-icon--qrcode {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #eef2ff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.portfolio-icon--animal {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: #fdf2f8;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.35);
}

.portfolio-icon--food {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fef2f2;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.portfolio-icon--eboard {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #f0f9ff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.portfolio-icon--weather {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: #ecfeff;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.35);
}

.portfolio-icon--skilltree {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #f0fdf4;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.portfolio-icon--coffeeratio {
  background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
  color: #fef3c7;
  box-shadow: 0 4px 12px rgba(120, 53, 15, 0.35);
}

.portfolio-icon--career {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #f5f3ff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.portfolio-icon--memory {
  background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
  color: #fefce8;
  box-shadow: 0 4px 12px rgba(202, 138, 4, 0.35);
}

.portfolio-icon--elrs {
  background: #ffffff;
  border: 1px solid rgba(43, 108, 176, 0.15);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.12);
}

.portfolio-content {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.portfolio-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  text-align: center;
}

.portfolio-desc {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  flex: 1;
}

.portfolio-desc-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-desc-group .portfolio-desc {
  flex: 0;
}

.portfolio-desc-group .portfolio-desc + .portfolio-desc {
  margin-top: -0.35rem;
}

.portfolio-note {
  color: #dc2626;
  font-weight: 400;
  margin-top: -0.35rem;
  flex: 0;
}

.portfolio-cta {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-top: auto;
}

@media (max-width: 768px) {
  .portfolio-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .portfolio-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 2.25rem 1.5rem 2rem;
  }

  .name {
    font-size: 1.5rem;
  }

  .bio {
    font-size: 0.85rem;
  }
}
