/* =====================
   HERO
===================== */

.about-hero{
  position:absolute;
  inset:0;

  height:100vh;
  display:grid;
  grid-template-columns:1fr 1fr;

  background:#E0E0E0;
  overflow:hidden;

  transition:transform .7s ease;
}


/* =====================
   左側內容
===================== */

.about-hero__content{
  padding:80px 64px 80px 80px;
  display:flex;
  flex-direction:column;
}


/* 姓名 */

.about-hero__name{
  display:flex;
  align-items:baseline;
  padding-top: 40px;
  gap:20px;
}

.about-hero__name-script{
  font-family:var(--font-script);
  font-size:clamp(3.5rem,6vw,5rem);
  line-height:1;
}

.about-hero__name-label{
  font-family:var(--font-serif);
  font-size:1rem;
  color:var(--color-text-lt);
  letter-spacing:.1em;
}


/* 標語 */

.about-hero__tagline{
  font-family:var(--font-serif);
  font-size:clamp(1.1rem,1.8vw,1.3rem);
  font-weight:700;

  border-left:3px solid var(--color-text-md);
  padding-left:16px;
  margin-bottom:18px;

  line-height:1.6;
}

.about-hero__subtitle{
  font-family:var(--font-serif);
  font-size:20px;
  color:var(--color-text-md);
  margin-bottom:40px;
  line-height:2;
}


/* =====================
   TIMELINE
===================== */

.about-timeline{
  flex:1;
  position:relative;
}


/* scroll container */

.timeline-scroll-wrapper{
  height:260px;
  overflow-y:auto;
  scrollbar-width:none;

  scroll-snap-type:y mandatory;
  scroll-padding-top:0;

  padding-bottom:180px;
}

.timeline-scroll-wrapper::-webkit-scrollbar{
  display:none;
}


/* timeline item */

.timeline-item{
  display:grid;
  grid-template-columns:180px 1fr;
  align-items:center;

  height:80px;

  scroll-snap-align:start;

  opacity:.35;
  transition:opacity .35s ease;
}


/* year */

.timeline-item__year{
  font-size:2.8rem;
  font-weight:300;
  color:#222;
}


/* description */

.timeline-item__desc{
  font-size:1.2rem;
  padding-left:26px;
  position:relative;
}

.timeline-item__desc::before{
  content:'';
  position:absolute;
  left:0;
  top:6px;
  bottom:6px;
  width:1px;
  background:#bbb;
}


/* active */

.timeline-item.active{
  opacity:1;
}

.timeline-item.active .timeline-item__year{
  font-size:3rem;
  font-weight:400;
}

.timeline-item.active .timeline-item__desc{
  color:#222;
}



/* =====================
   HERO IMAGE
===================== */

.about-hero__image{
  position:relative;
}

.about-hero__image img{
  width:100%;
  height:100%;
  object-fit:cover;
}


/* =====================
   箭頭
===================== */
.about-hero__arrow{
  position:absolute;
  right:60px;
  bottom:50px;
  cursor:pointer;
}

.about-hero__arrow img{
  width:28px;
  height:28px;
  transition:.25s;
}

.about-hero__arrow:hover img{
  transform:translateX(4px);
  opacity:.7;
}

/* =====================
   PAGE SLIDE
===================== */

/* 第二頁 layout */

.about-hero__content--page2{
  padding:80px 80px 60px;
}

/* GRID */

.about-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:auto auto;
  gap:30px 50px;
  margin-top:30px;
}

/* 專業證照 */

.about-block--cert{
  grid-column:1 / span 2;
  max-width:420px;
}

/* block title */

.about-block h3{
  font-size:18px;
  margin-bottom:14px;
  border-left:3px solid #777;
  padding-left:12px;
}

/* list */

.about-block ul{
  padding-left:18px;
}

/* list item */

.about-block li{
  margin-bottom:6px;
  line-height:1.4;
  font-size:15px;
}

/* paragraph */

.about-block p{
  margin-bottom:6px;
  line-height:1.4;
  font-size:15px;
}
/* 左邊圖片 */
.about-hero__image--work{
  display:flex;
  flex-direction:column;
  padding-top: 100px;
  align-items:center;
}

.about-hero__image--work img{
  width:340px;
  height:auto;
  border-radius:10px;
}

.work-caption{
  font-size:12px;
  margin-top:8px;
  opacity:.6;
}

/* 小箭頭 */

.work-arrows{
  display:flex;
  gap:30px;
  margin-top:20px;
}

.work-arrows .arrow{
  font-size:22px;
  cursor:pointer;
}

/* 第二頁初始在右邊 */

.about-hero--page2{
  transform:translateX(100%);
}

/* 切換 */

.about-page.slide2 .about-hero{
  transform:translateX(-100%);
}

.about-page.slide2 .about-hero--page2{
  transform:translateX(0);
}

.work-arrows{
  display:flex;
  gap:30px;
  margin-top:20px;
}

.arrow{
  background:none;
  border:none;
  cursor:pointer;
  padding:4px;
}

.arrow img{
  width:22px;
  height:22px;
  transition:.25s;
}

.arrow:hover img{
  transform:scale(1.2);
  opacity:.6;
}


/* =====================
   文字動畫
===================== */

@keyframes fadeUp{

  from{
    opacity:0;
    transform:translateY(20px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }

}

.about-hero__name,
.about-hero__tagline,
.about-hero__subtitle{
  opacity:0;
  animation:fadeUp .8s ease forwards;
}

.about-hero__name{animation-delay:.1s;}
.about-hero__tagline{animation-delay:.3s;}
.about-hero__subtitle{animation-delay:.5s;}

#workImage{
  transition:opacity .25s ease;
}

.fade-out{
  opacity:0;
}




/* ══════════════════════════════
   RWD — 平板 (641px ~ 1024px)
══════════════════════════════ */
@media (min-width: 641px) and (max-width: 1024px) {

  /* 外層容器 */
  .about-page {
    overflow: hidden;
    padding-top: 60px;
  }

  /* 兩頁容器 */
  .about-pages-wrap {
    position: relative;
    width: 100vw;
    overflow: hidden;
  }

  /* 每頁佔滿螢幕寬，flex column */
  .about-hero {
    position: relative !important;
    inset: auto !important;
    width: 100vw !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset !important;
    overflow: hidden;
    transition: transform 0.7s ease;
    transform: translateX(0);
  }

  /* 圖片在上，文字在下（Page 1） */
  .about-hero__image {
    display: block;
    line-height: 0;
    position: relative;
  }

  .about-hero__image img {
    display: block;
    width: 100%;
    height: auto;
  }

  .about-hero__content {
    padding: 32px 48px 40px;
    order: -1;
  }

  .about-hero__name-script {
    font-size: clamp(2.8rem, 5vw, 4rem);
  }

  .about-hero__subtitle {
    font-size: 16px;
    margin-bottom: 20px;
    line-height: 1.8;
  }

  .about-hero__arrow {
    position: absolute;
    right: 32px;
    bottom: 24px;
    z-index: 2;
  }

  /* Timeline */
  .timeline-scroll-wrapper {
    max-height: 200px;
    overflow-y: auto;
  }

  .timeline-item {
    grid-template-columns: 120px 1fr;
    height: auto;
  }

  .timeline-item__year {
    font-size: 2rem;
  }

  .timeline-item.active .timeline-item__year {
    font-size: 2.2rem;
  }

  /* 第二頁預設藏右邊 */
  .about-hero--page2 {
    position: absolute !important;
    top: 0;
    left: 0;
    transform: translateX(100%);
  }

  /* slide2 切換 */
  .about-page.slide2 .about-hero:not(.about-hero--page2) {
    position: absolute !important;
    top: 0;
    left: 0;
    transform: translateX(-100%);
  }

  .about-page.slide2 .about-hero--page2 {
    position: relative !important;
    transform: translateX(0);
  }

  /* Page 2：圖上字下 */
  .about-hero__image--work {
    order: -1;
    padding: 32px 0 16px;
    align-items: center;
    text-align: center;
  }

  .about-hero__content--page2 {
    order: 1;
  }

  .about-hero__image--work img {
    width: 60%;
    max-width: 340px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .work-caption {
    text-align: center;
  }

  .work-arrows {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 14px;
  }

  .about-hero__content--page2 {
    padding: 24px 48px 48px;
    text-align: center;
  }

  .about-hero__content--page2 .about-block h3 {
    border-left: none;
    padding-left: 0;
    text-align: center;
  }

  .about-hero__content--page2 .about-block ul {
    list-style: none;
    padding-left: 0;
    text-align: center;
  }

  .about-hero__content--page2 .about-block p {
    text-align: center;
  }

  .about-hero--page2 .about-hero__name {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 16px;
  }

  .about-block--cert {
    grid-column: 1;
    max-width: 100%;
  }

  .about-block h3 {
    font-size: 16px;
  }

  .about-block li,
  .about-block p {
    font-size: 14px;
  }
}


/* ══════════════════════════════
   RWD — 手機 (max-width: 640px)
══════════════════════════════ */
@media (max-width: 640px) {

  /* ── 外層容器 ── */
  .about-page {
    overflow: hidden;
    padding-top: 60px;
  }

  /* ── 兩頁容器：相對定位，高度由當前頁決定 ── */
  .about-pages-wrap {
    position: relative;
    width: 100vw;
    overflow: hidden;
  }

  /* ── 每頁各佔一個螢幕寬，預設在原位 ── */
  .about-hero {
    position: relative;
    width: 100vw;
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
    transition: transform 0.7s ease;
    transform: translateX(0);
  }

  /* 第二頁預設藏在右邊，疊在第一頁上方 */
  .about-hero--page2 {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(100%);
  }

  /* slide2：第一頁變 absolute 滑出去（不佔高度），第二頁變 relative 撐開高度 */
  .about-page.slide2 .about-hero:not(.about-hero--page2) {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-100%);
  }

  .about-page.slide2 .about-hero--page2 {
    position: relative;
    transform: translateX(0);
  }

  /* ── Page 1：文字在上，圖片緊接其後 ── */
  .about-hero__image {
    display: block;
    line-height: 0;
    position: relative;
  }

  .about-hero__image img {
    display: block;
    width: 100%;
    height: auto;
  }

  .about-hero__content {
    padding: 28px 24px 0px;
  }

  .about-hero__name {
    padding-top: 8px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .about-hero__name-script {
    font-size: 2.8rem;
  }

  .about-hero__tagline {
    font-size: 1rem;
    margin-bottom: 12px;
  }

  .about-hero__subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .about-hero__arrow {
    position: absolute;
    right: 16px;
    bottom: 16px;
  }

  /* Timeline */
  .timeline-scroll-wrapper {
    max-height: 180px; /* 🔥改這個 */
    overflow-y: auto;
  }

  .timeline-item {
    grid-template-columns: 90px 1fr;
    height: auto;
  }

  .timeline-item__year {
    font-size: 1.6rem;
  }

  .timeline-item.active .timeline-item__year {
    font-size: 1.8rem;
  }

  .timeline-item__desc {
    font-size: 0.9rem;
    padding-left: 16px;
  }

  .about-hero__arrow--back {
    position: static;
    display: flex;
    justify-content: center;
    margin: 12px auto 0;
  }

  /* ── Page 2：圖片在上，文字在下 ── */
  .about-hero__image--work {
    grid-row: 1;
    padding: 24px 0 12px;
    align-items: center;
    text-align: center;
  }

  .about-hero__image--work img {
    width: 75%;
    max-width: 260px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .work-caption {
    text-align: center;
  }

  .work-arrows {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
  }

  .about-hero__content--page2 {
    grid-row: 2;
    padding: 24px 24px 40px;
    text-align: center;
  }

  .about-hero__content--page2 .about-block h3 {
    border-left: none;
    padding-left: 0;
    text-align: center;
  }

  .about-hero__content--page2 .about-hero__tagline {
    border-left: none;
    padding-left: 0;
    text-align: center;
  }

  .about-hero__content--page2 .about-block ul {
    list-style: none;
    padding-left: 0;
    text-align: center;
  }

  .about-hero__content--page2 .about-block p {
    text-align: center;
  }

  .about-hero--page2 .about-hero__name {
    justify-content: center;
  }



  .about-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 16px;
  }

  .about-block--cert {
    grid-column: 1;
    max-width: 100%;
  }

  .about-block h3 {
    font-size: 15px;
  }

  .about-block li,
  .about-block p {
    font-size: 13px;
  }

  
}

html.resizing .about-pages-wrap,
html.resizing .about-hero,
html.resizing .about-hero--page2 {
  transition: none !important;
}