@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&family=Noto+Sans+TC:wght@400;500;700&family=Noto+Serif+TC:wght@600;700&display=swap');

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.22) rgba(0, 0, 0, 0.06);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
  background-clip: padding-box;
}

body {
  font-family: 'DM Sans', 'Noto Sans TC', sans-serif;
}

.font-display {
  font-family: 'Noto Serif TC', serif;
}

@keyframes geo-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(5deg); }
}

@keyframes geo-float-reverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(10px) rotate(-6deg); }
}

@keyframes geo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes geo-pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.04); opacity: 0.85; }
}

@keyframes geo-slide {
  0% { transform: translateX(-6%); }
  100% { transform: translateX(6%); }
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes geo-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}

@keyframes blur-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -10px) scale(1.05); }
}

.page-canvas {
  background:
    linear-gradient(180deg, #fafafa 0%, #f3f3f1 45%, #ececea 100%);
}

.page-pattern {
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
}

.blur-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: blur-drift 14s ease-in-out infinite;
}

.blur-orb--1 {
  width: 280px;
  height: 280px;
  top: 8%;
  left: -40px;
  background: rgba(255, 255, 255, 0.95);
}

.blur-orb--2 {
  width: 220px;
  height: 220px;
  top: 52%;
  right: -30px;
  background: rgba(255, 255, 255, 0.75);
  animation-delay: -5s;
}

.blur-orb--3 {
  width: 180px;
  height: 180px;
  bottom: 8%;
  left: 18%;
  background: rgba(0, 0, 0, 0.03);
  animation-delay: -9s;
}

.geo-shape {
  position: absolute;
  pointer-events: none;
}

.geo-circle-1 {
  width: 300px;
  height: 300px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  top: 6%;
  left: -90px;
  animation: geo-float 10s ease-in-out infinite;
}

.geo-circle-2 {
  width: 180px;
  height: 180px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  bottom: 10%;
  right: -50px;
  animation: geo-float-reverse 12s ease-in-out infinite;
}

.geo-square {
  width: 84px;
  height: 84px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  top: 16%;
  right: 10%;
  animation: geo-spin 32s linear infinite;
}

.geo-triangle {
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 52px solid rgba(0, 0, 0, 0.04);
  bottom: 20%;
  left: 8%;
  animation: geo-float 14s ease-in-out infinite;
}

.geo-line-track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.55;
}

.geo-line {
  position: absolute;
  height: 1px;
  width: 130%;
  left: -15%;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.12), transparent);
  animation: geo-slide 14s ease-in-out infinite alternate;
}

.geo-line-1 { top: 24%; }
.geo-line-2 { top: 50%; animation-delay: -4s; }
.geo-line-3 { top: 76%; animation-delay: -8s; }

.avatar-orbit {
  position: absolute;
  inset: -10px;
  border: 1px dashed rgba(0, 0, 0, 0.18);
  border-radius: 50%;
  animation: geo-spin 26s linear infinite;
}

.avatar-pulse {
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  animation: geo-pulse-ring 5s ease-in-out infinite;
}

.card-enter {
  animation: card-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.glass-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(245, 245, 242, 0.78) 0%, rgba(236, 236, 232, 0.62) 100%);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.card-geo-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.card-geo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.card-geo-corner {
  position: absolute;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.card-geo-corner--tl {
  top: -30px;
  left: -30px;
  border-radius: 50%;
}

.card-geo-corner--br {
  right: -24px;
  bottom: -24px;
  transform: rotate(18deg);
}

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

.surface-tile {
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.surface-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 0, 0, 0.16);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.portfolio-geo {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
}

.portfolio-geo svg {
  position: absolute;
  inset: 0;
  animation: geo-breathe 5s ease-in-out infinite;
}

.portfolio-tile--design .portfolio-geo svg { animation-delay: 0s; }
.portfolio-tile--dev .portfolio-geo svg { animation-delay: -1.6s; }
.portfolio-tile--music .portfolio-geo svg { animation-delay: -3.2s; }

.social-btn svg {
  width: 18px;
  height: 18px;
}

.contact-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
