/* ========== 全域設定 ========== */
html {
  scroll-behavior: smooth;
}

* {
  padding: 0;
  margin: 0;
}

section{
  margin: 200px;
}

body {
  min-height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "Helvetica Neue", Arial;
  background: #f5f5f7;
  color: #000; /* 預設黑色字 */
}

/* ========== header 頁首 ========== */
header {
  background-color: #25386b;
  height: 80px;
  width: 100%;
  position: relative;
}

header a {
  color: #ffffff;
  text-decoration: none;
}

header ul {
  position: absolute;
  right: 5vw;
  top: 0;
  line-height: 80px;
}

header li {
  display: inline;
  margin-right: 4vw;
}

/* ========== 導覽列 nav ========== */
nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
}

nav a {
  position: relative;
  text-decoration: none;
  font-weight: 600;
  color: #707070;
  transition: color 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: #ffffff;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #ffffff;
}

nav a:hover::after {
  width: 100%;
}

/* ========== Hero 區塊 ========== */
.hero {
  height: 100vh;
  background-image: url("/image/Made with FlexClip AI-2025-09-10T105017.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero h1 {
  font-size: 100px;
  opacity: 0;
  transform: scale(0.9);
  animation: fadeZoom 1s ease forwards;
}

@keyframes fadeZoom {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========== 頭貼、圖片 ========== */
.IMG_0538 {
  height: 400px;
  width: 400px;
  border-radius: 50%;
}

.image {
  width: 200px;
  height: auto;
  object-fit: contain;
}

/* ========== 自我介紹區塊 ========== */
.profile {
  display: flex;
  align-items: stretch;
  gap: 40px;
}

.profile-img {
  flex: 0 0 20%;
}

.profile-img img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.introduce {
  flex: 1;
  line-height: 1.8;
  text-align: justify;
}

/* ========== 我的作品區塊 ========== */
.service {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.service div {
  text-align: center;
}

.service img {
  width: 380px;
  height: 500px;
  display: block;
  margin: 0 auto;
}

.card{
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.card img {
  display: block;
  width: 380px;
  height: 500px;
  object-fit: cover;
  transition: filter 0.5s ease;
}

.card .overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6),rgb(0,0,0,0));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.6s ease;
}

.card .overlay a {
  color: #25386b;
  font-size: 1.2rem;
  text-decoration: none;
  background: rgb(225, 225, 225);
  padding: 8px 14px;
  border-radius: 50px;
  backdrop-filter: blur(2px);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 0.2s;
}

.card .overlay a:hover{
  background: rgb(0, 0, 0);
  color: #fff;
}

.card:hover img{
  filter: blur(3px);
}

.card:hover .overlay {
  opacity: 1;
  transform: translateY(0);
}
.card:hover .overlay a{
  opacity: 1;
  transform: translateY(0);
}
/* ========== 相關技能區塊 ========== */
.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 40px;
}

.Related {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 200px;
  height: 250px;
  background-color: #25386b;
  border-radius: 20px;
}

/* LOGO 技能圓環 */
.LOGO {
  --size: 6rem;        /* 圓圈大小 */
  --ring-offset: -10px;/* 外圍距離 */
  --fill: 0%;          /* 動畫變數 */
  position: relative;
  width: var(--size);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #373737;
  cursor: pointer;
  overflow: visible;
  transition: color 0.35s ease;
}

.LOGO img {
  width: 70%;
  height: 70%;
  opacity: 0.5;
  border-radius: 50%;
  object-fit: contain;
  pointer-events: none;
}

.LOGO::after {
  content: '';
  position: absolute;
  inset: var(--ring-offset);
  z-index: -1;
  opacity: 0.5;
  border-radius: 50%;
  background: conic-gradient(rgb(255, 255, 255) var(--fill), transparent var(--fill));
  transition: --fill 900ms ease-in-out, transform 300ms ease;
  box-shadow: 0 0 0 6px rgba(0,0,0,0.04) inset;
  pointer-events: none;
}

.LOGO:hover {
  color: rgb(255, 255, 255);
}

.LOGO:active {
  transform: scale(0.98);
}

/* 技能百分比文字 */
.LOGO .pct {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  pointer-events: none;
  letter-spacing: 0.5px;
}

.skill-label {
  font-size: 1rem;
  color: #cecece;
}

/* 頁尾 */
footer {
  background-color: #25386b;
  width: 100%;
  height: 200px;
  position: relative;
}
/* @property 定義 (for --fill 動畫) */
@property --fill {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 0%;
}
@media (min-width: 768px) {
  .profile {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .avatar {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
  }
  .introduce {
    width: 100%;
    flex-basis: 100%;
  }
  .divider {
    display: none; /* 桌面可隱藏小分隔線 */
  }
}

/* ========== 文字樣式 ========== */
.inter-regular {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.8; 
  text-align: center;
  margin-bottom: 12px;
}

.inter-white {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.8; 
  text-align: justify;
  margin-bottom: 12px;
  color: #cecece;
}

.inter-bold {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-style: normal;
}

/* ========== 區塊進場動畫 ========== */
section,
.service img,
.skills .Related,
h2 {
  scroll-margin-top: 80px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

h2 {
  text-align: center;
  margin: 40px 0;
  color: #25386b;
}
/* ========== 響應式 (手機板) ========== */
@media (max-width:768px) {
  .profile {
    flex-direction:column;
    align-content: center;
    justify-content: center;
  }
}