* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}


html, body, * {
  cursor: none !important;
}

.img-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 35px; 
  height: 35px;
  background: url('img/000.png') no-repeat center/contain;
  pointer-events: none;
  transform: translate(-10%, -10%) rotate(-25deg);
  z-index: 9999;
}



html {
  font-size: 16px;
}

body {
  font-family:
  'Arial Narrow', Arial, sans-serif,
  'PingFang TC', 'Noto Sans TC', 'Microsoft JhengHei', sans-serif;
  color: #000000;
  min-width: 1024px;
}

/*--------------------------------------------------------------------------------------*/

#home {
  height: 95vh;  
  background: url('img/bg.png') center/cover no-repeat;
  position: relative;
}

.name {
  position: absolute;
  top: 1rem; left: 2rem;
  font-family: 'Arial Narrow', sans-serif;
  font-size: 1rem;
}

.home-center-pic {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 45vw;
  opacity: 0;
  animation: fadeIn 1s ease-in-out 0.5s forwards;
  z-index: 999;
}


@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff; 
  font-size: 1rem;
  pointer-events: none;
}

.scroll-hint .arrow {
  font-size: 1.5rem;
  animation: bounce 1.5s ease-in-out infinite;
}

.scroll-hint .text {
  margin-top: 0.5rem;
}

/* 跳動動畫 */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}


#home .stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

#home .stars .star {
  position: absolute;
  width: 1.5rem;
  height: auto;
  opacity: 0;
  animation-name: twinkle;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}


.dog-popup {
  position: absolute;
  max-width: 15rem;
  height: auto;
  opacity: 0; 
  transition: opacity 0.5s ease;
  z-index: 10;
  transform: translate(-50%, -50%);
}




/*── 區塊標題 ───────────────────────────────────────────────────────────────────────────────*/

.section-title {
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-size: 2rem;
  text-align: center;
    
  position: relative;
  display: inline-block;
  padding: 5rem 5rem 2rem 8rem;
}


/*--------------------------------------------------------------------------------------*/

#about {
  position: relative;
}

.marquee-container {
  width: 100%;
  overflow: hidden;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  background: transparent;
}

.marquee {
  white-space: nowrap;
  overflow: hidden;
}

.marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 20s linear infinite;
  font-size: 1.5rem;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.about-text {
  margin: 0 15% 0 auto;
  width: 30rem; 
  line-height: 1.6; 
  font-size: 0.9rem;
  padding: 0 1rem;
}

.greeting {
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-size: 1.8rem;
  margin: 1rem 5rem 0 auto;
}


.scramble-text {
  display: inline-block;
}


.italic-name {
  font-family: 'Bodoni Moda', serif;
  font-style: italic;
  font-size: 1.8rem;
}

.about-text .ch {
  margin-top: 2rem;
  text-align: justify; 
}

.about-text .en {
  margin-top: 2rem;
  font-size: 1rem;
}

.about-img {
  position: absolute;
  top: 18rem;
  left: 18%;
  width: 12rem;
  height: auto;
  object-fit: cover;
  transform: rotate(8deg);
}





.about-text .about-divider {
  border: none;
  border-top: 1px solid  #b2b2b2;
  margin: 2rem 0;
}

.about-text .skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.about-text .skills button {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}


.about-text .skills button:hover {
  background: #000;
  color: #fff;
}



.cursor-trail {
  position: fixed;
  pointer-events: none;
  font-size: 1.5rem;
  color: #9f9f9f;
  opacity: 1;
  animation: trailFade 0.8s ease-out forwards;
  z-index: 999; 
}

@keyframes trailFade {
  to {
    opacity: 0;
    transform: translateY(-1rem);
  }
}




/*--------------------------------------------------------------------------------------*/
#portfolio {
  padding-bottom: 2rem;
}


.highlight-web {
  font-family: 'MonteCarlo', cursive;
  font-weight: bold;
  font-size: 3.2rem; 
  margin: 0 .25rem;
}

#project1 {
  padding: 2rem 0;
  padding-bottom: 1rem;
  margin: 0 8rem;
}

.project-title {
  font-size: 2.5rem;
  text-align: left;
  margin-bottom: 1.5rem;
}


.project-title {
  overflow: hidden;
}

.project-title span {
  display: inline-block;
  transform: translateX(-100%);
  opacity: 0;
}

.project-title.visible span {
  animation: slideIn 0.8s ease-out forwards;
}



@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}






.blocks {
  display: flex;
  flex-direction: column;
}

.block {
  position: relative;
  flex: 1;
  cursor: pointer;
}

.block-more {
  position: absolute;
  bottom: 1rem;
  right: 0rem;
  font-size: 1rem;
  color: rgba(173, 173, 173, 0.6);
  pointer-events: none;
  transition: color 0.2s;
}

.block:hover .block-more {
  color: rgba(0,0,0,0.9);
}

.block-content {
  display: flex;
  align-items: flex-start; 
  padding: 2rem 0;
}

.block-images {
  display: flex;
  gap: 0.5rem;
  width: 40%;
}

.thumb-wrapper {
  position: relative;
  overflow: hidden;
}

.large {
  flex: 0 0 100%;
}

.small {
  flex: 0 0 60%;       
}

.large-thumb,
.small-thumb {
  display: block;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.thumb-wrapper:hover img {
  transform: scale(1.2);
}


.block-text {
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; 
  align-items: flex-end;
  text-align: right; 
  width: 60%;
}

.block-name {
  font-size: 1.5rem;
  display: inline-block;
  cursor: pointer;

}


.block-name:hover {
  background-color: #000;
  color: #fff;
}

.block-medium {
  font-size: 0.8rem;
  padding-top: 1rem;
}


.block-separator {
  width: 100%;
  height: 1px;  
  background: #b2b2b2;
}



/*── Graphic Design 圖庫 ─────────────────────────*/

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 5rem ;
  margin: 3rem 0rem;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.gallery-caption {
  margin-top: 1rem;
  font-size: 0.9rem;
}

.gallery-item {
  overflow: hidden;
  position: relative;
}

.gallery-item .img-wrapper {
  width: 100%;
  padding-top: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-item .img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  transform-origin: center center;
}
/* hover 時放大 */
.gallery-item .img-wrapper:hover img {
  transform: scale(1.1);
}


/*── 圖片預覽 Modal ──────────────────────────────────*/

.img-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.img-modal-content {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.img-modal-close {
  position: absolute;
  top: 3rem; right: 5rem;
  font-size: 1.5rem;
  color: #ffffff;
  cursor: pointer;
  user-select: none;
}



/*── 小頁面 (modal)  ───────────────────────────────────────────────────*/
.modal {
  position: fixed;
  top: 4vh;
  left: 50%;
  transform: translateX(-50%);
  width: 85vw;
  height: 92vh;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 1000;
  display: none;
  padding: 0rem 8rem;
}

.modal.active {
  display: block;
}

.modal-fade {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3rem;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,1) 100%
  );
  z-index: 1001;
}


.modal-close {
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.modal-close:hover {
  background: #000;
  color: #fff;
}

.modal-header {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: 'Arial Narrow', sans-serif;
  font-size: 1rem;
  color: #000;
  pointer-events: none;
}

/*── modal-content ─────────────────────────────────────────────*/
.modal-content {
  padding-top: 4rem;
  position: relative;
}


.project-info {
  width: 100%;
  margin-bottom: 6rem;
  margin-top: 3rem;
}

.project-info-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.8rem;
  margin: 0;
  border-bottom: 1px solid #b2b2b2;
  padding-bottom: 0.9rem;
  
}

.project-info-subtitle {
  font-size: 0.875rem;
}

.project-info-desc {
  margin-top: 2rem;
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: left;
  width: 60%;
  text-align: justify; 
}


.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 5rem;
}

.project-gallery img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.project-info-link {
  margin-top: 1.5rem;
}
.project-info-link a {
  color: #a3a3a3;
  text-decoration: underline;
}
.project-info-link a:hover {
  color: #000000;
}



.back-to-top {
  position: absolute;
  right: -4rem;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  z-index: 1002;
}

.back-to-top:hover {
  background: #000;
  color: #fff;
}


/*--------------------------------------------------------------------------------------*/

#end {
    height: 80vh;
    padding: 0 3rem;
    position: relative; 
    background: url('img/endbg.png') center center / contain no-repeat;
}

.end-quote {
    position: absolute;
    top: 41%; 
    left: 8rem;
    font-size: 2.2rem;
    color: #000;
    line-height: 3rem;
}

.handwritten {
    font-family: 'MonteCarlo', cursive;
    font-weight: bold;
    font-size: 3.4rem;
}

.end-menu {
    position: absolute;
    top: 40%; 
    right: 12rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.end-menu li {
    font-family: 'Arial Narrow', Arial, sans-serif;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.end-menu li::before {
    content: "● ";
    color: #000;
}




.end-contact {
  position: absolute;
  bottom: 4%; 
  right: 8%;
  display: flex;
  gap: 2rem; 
  align-items: center;
  font-family: 'Arial Narrow', Arial, sans-serif;
  font-size: 1rem;
}

.end-contact a {
  color: inherit;
  text-decoration: none;
}

.end-contact a:hover {
  background: black;
  color: #ffffff;
}

.end-email {
  font-size: 1.3rem;
}





/*--------------------------------------------------------------------------------------*/

#footer {
  height: 5vh;  
  background: #000;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem 0;
}
  
  #footer p {
  font-size: 0.875rem;
}

/*--------------------------------------------------------------------------------------*/


#scroll-wrapper {
  position: fixed;
  top: 1rem;
  right: 1rem;
  pointer-events: auto;
  z-index: 2000;
  overflow: visible;
  cursor: pointer;
}


#scroll-icon {
  font-size: 2rem;
  transition: transform 0.1s;
  cursor: pointer;

}

#contact-label {
  position: absolute;
  top: calc(100% + 1rem);
  left: 50%;
  transform: translateX(-50%) rotate(90deg);
  transform-origin: center;
  font-size: 1rem;
  display: none;
  white-space: nowrap;
  cursor: pointer;

}

#contact-label:hover{
  background: #000;
  color: #ffffff;
}

/*── Contact 選單 ─────────────────────────────────────────*/
#contact-menu {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: #f3f3f3;
  border: #888888 0.8px solid;
  padding: 2rem 9rem 1.5rem 1.8rem;
  z-index: 3000;
  display: none;
  font-family: 'Arial Narrow', Arial, sans-serif;
}

#contact-menu p {
  margin: 1rem 0 3rem;
  font-size: 1.4rem;
}

#contact-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#contact-menu li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

#contact-menu li span:first-child {
  flex: 0 0 auto;
}

#contact-menu li a,
#contact-menu li span:not(:first-child) {
  flex: 0 0 auto;
  text-align: left;
  color: #000;
  text-decoration: none;
  font-size: 0.9rem;

}

#contact-menu li a:hover {
  text-decoration: underline;
  background-color: #000;
  color: #ffffff;
}

.contact-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #000;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.contact-close:hover {
  background: #000;
  color: #ffffff;
}

/*--------------------------------------------------------------------------------------*/


#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s;
}

#scrollTopBtn:hover {
  transform: scale(1.2);
  color: #000;
}





#mobile-block {
  display: none;
}


#mobile-block {
  display: none;
}

@media (max-width: 1024px) {
  #site-content {
    display: none !important;
  }

  #mobile-block {
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    text-align: center;
    padding: 2rem;
    font-size: 1.25rem;
    color: #333333;
    line-height: 1.6;
  }
}
