/* ============================================================
   MOLA DESIGN — minimal portfolio
   ============================================================ */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.5);
  --faint: rgba(255, 255, 255, 0.28);
  --line: rgba(255, 255, 255, 0.16);
  --pad: clamp(18px, 4vw, 56px);
  --nav-h: 60px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans TC', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: #fff; color: #000; }

/* ---------------- nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { font-weight: 600; letter-spacing: -0.02em; font-size: 15px; }
.nav__links { display: flex; gap: 26px; }
.nav__links a {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); transition: color 0.25s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--fg); }
.nav__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.nav__meta span { font-size: 10.5px; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.nav__role { color: var(--faint) !important; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; width: 28px; }
.nav__toggle span { display: block; height: 1.5px; background: #fff; transition: 0.3s; }

/* ---------------- generic ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--fg); border-radius: 100px;
  padding: 11px 22px; font-size: 13px; letter-spacing: 0.02em;
  background: var(--fg); color: var(--bg);
  transition: background 0.25s, color 0.25s;
}
.btn:hover { background: transparent; color: var(--fg); }
.btn--ghost { background: transparent; color: var(--fg); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); }

/* ---------------- hero ---------------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--nav-h) var(--pad) 40px;
  position: relative;
}
.hero__intro {
  display: inline-flex; gap: clamp(8px, 1.3vw, 20px);
  align-items: baseline; align-self: flex-start;
  margin-bottom: clamp(12px, 2vw, 28px);
  overflow: hidden;
  font-size: clamp(20px, 5.2vw, 76px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
  text-transform: uppercase;
}
.hero__intro span {
  display: inline-block;
  opacity: 0;
  transform: translateY(115%) rotate(3deg);
  filter: blur(8px);
  animation: hero-intro-in 0.9s cubic-bezier(.16, 1, .3, 1) forwards;
}
.hero__intro span:nth-child(2) { animation-delay: 0.14s; }
.hero__intro span:nth-child(3) { animation-delay: 0.22s; }
.hero__rotator { position: relative; height: 1.05em; }
.hero__word {
  position: absolute; inset: 0;
  font-size: clamp(48px, 13vw, 188px);
  font-weight: 600; letter-spacing: -0.05em; line-height: 1; white-space: nowrap;
  opacity: 0; transform: translateY(40%); transition: opacity 0.6s, transform 0.6s;
}
.hero__word.is-on { opacity: 1; transform: translateY(0); }
.hero__scroll {
  position: absolute; bottom: 28px; left: var(--pad);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
@keyframes hero-intro-in {
  to { opacity: 1; transform: translateY(0) rotate(0); filter: blur(0); }
}

/* ---------------- band marquee ---------------- */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; padding: 20px 0; }
.band__track { display: inline-flex; align-items: center; gap: 28px; white-space: nowrap; animation: scroll-x 30s linear infinite; }
.band__track span { font-size: clamp(28px, 5vw, 64px); font-weight: 600; letter-spacing: -0.03em; }
.band__dot { color: var(--muted); font-size: 0.5em !important; }
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------------- about ---------------- */
.about {
  display: grid; grid-template-columns: minmax(220px, 0.8fr) 1.2fr; gap: clamp(24px, 5vw, 80px);
  align-items: center; padding: clamp(60px, 10vw, 150px) var(--pad);
}
.about__img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 4px; }
.about__text { font-size: clamp(22px, 3vw, 40px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.18; margin-bottom: 34px; }

/* ---------------- featured / worklist ---------------- */
.featured { padding: clamp(40px, 7vw, 100px) var(--pad); border-top: 1px solid var(--line); }
.featured__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; flex-wrap: wrap; gap: 16px; }
.featured__title { font-size: clamp(30px, 5vw, 68px); font-weight: 600; letter-spacing: -0.04em; }
.worklist { list-style: none; position: relative; }
.worklist__item { border-top: 1px solid var(--line); }
.worklist__item:last-of-type { border-bottom: 1px solid var(--line); }
.worklist__link {
  display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 20px;
  padding: clamp(18px, 2.4vw, 34px) 4px;
  transition: padding-left 0.35s ease, color 0.35s; color: var(--fg);
}
.worklist__link:hover { padding-left: 24px; }
.worklist__index { font-size: 13px; color: var(--muted); }
.worklist__name { font-size: clamp(24px, 4vw, 52px); font-weight: 600; letter-spacing: -0.03em; }
.worklist__cat { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.worklist__item:hover ~ .worklist__cursor { opacity: 1; }
.worklist__cursor {
  position: fixed; top: 0; left: 0; width: 220px; height: 280px; pointer-events: none;
  z-index: 50; opacity: 0; transition: opacity 0.25s; transform: translate(-50%, -50%);
  overflow: hidden; border-radius: 6px;
}
.worklist__cursor img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none) { .worklist__cursor { display: none; } }

/* ---------------- services accordion ---------------- */
.services { padding: clamp(40px, 7vw, 100px) var(--pad); border-top: 1px solid var(--line); }
.services__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 24px; }
.services__title { font-size: clamp(30px, 5vw, 68px); font-weight: 600; letter-spacing: -0.04em; }
.services__count { font-size: 16px; color: var(--muted); }
.accordion { list-style: none; }
.accordion__item { border-top: 1px solid var(--line); }
.accordion__item:last-child { border-bottom: 1px solid var(--line); }
.accordion__head {
  width: 100%; background: none; border: 0; cursor: pointer; color: var(--fg);
  display: grid; grid-template-columns: 60px 1fr 30px; align-items: center; gap: 16px;
  padding: clamp(18px, 2.2vw, 30px) 4px; text-align: left; font-family: inherit;
}
.accordion__num { font-size: 13px; color: var(--muted); }
.accordion__title { font-size: clamp(19px, 2.6vw, 32px); font-weight: 500; letter-spacing: -0.02em; }
.accordion__icon { font-size: 22px; color: var(--muted); transition: transform 0.3s; justify-self: end; }
.accordion__item.is-open .accordion__icon { transform: rotate(45deg); }
.accordion__panel { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.accordion__inner { padding: 0 4px clamp(20px, 2.4vw, 34px) 76px; max-width: 760px; color: var(--muted); white-space: pre-line; font-size: 15px; line-height: 1.6; }

/* ---------------- practice marquee ---------------- */
.practice { overflow: hidden; padding: clamp(30px, 5vw, 70px) 0; border-top: 1px solid var(--line); }
.practice__track { display: inline-flex; gap: clamp(22px, 3vw, 42px); white-space: nowrap; animation: scroll-x 24s linear infinite; }
.practice__track span {
  font-family: 'Inter Tight', var(--font);
  font-size: clamp(46px, 10vw, 150px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
.practice__b {
  -webkit-text-stroke: 0;
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
}

/* ---------------- resume ---------------- */
.resume { padding: clamp(40px, 7vw, 100px) var(--pad); border-top: 1px solid var(--line); }
.resume__row {
  display: grid; grid-template-columns: 1.4fr 1fr 1.4fr 0.8fr; gap: 16px; align-items: baseline;
  padding: clamp(16px, 2vw, 26px) 0; border-bottom: 1px solid var(--line);
}
.resume__co { font-size: clamp(20px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.02em; }
.resume__period, .resume__role, .resume__loc { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.resume__loc { text-align: right; }

/* ---------------- page heads ---------------- */
.page { padding-top: var(--nav-h); min-height: 100svh; }
.page__head { padding: clamp(50px, 9vw, 130px) var(--pad) 30px; display: flex; align-items: baseline; gap: 16px; }
.page__head--gallery { justify-content: space-between; }
.page__title { font-size: clamp(44px, 11vw, 150px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; }
.page__count { font-size: 18px; color: var(--muted); }

/* ---------------- work grid ---------------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 var(--pad) 30px; }
.filterbar__btn {
  background: none; border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  border-radius: 100px; padding: 8px 18px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
  font-family: inherit; transition: 0.25s;
}
.filterbar__btn:hover, .filterbar__btn.is-active { background: #fff; color: #000; border-color: #fff; }
.workgrid { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 50px); padding: 0 var(--pad) 80px; }
.workcard__media { overflow: hidden; border-radius: 4px; aspect-ratio: 4/5; }
.workcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.workcard:hover .workcard__media img { transform: scale(1.04); }
.workcard__meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.workcard__name { font-size: clamp(18px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.02em; }
.workcard__index { font-size: 13px; color: var(--muted); }
.workcard__cat { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* ---------------- work detail ---------------- */
.detail__head { padding: clamp(50px, 9vw, 130px) var(--pad) 18px; }
.detail__title { font-size: clamp(40px, 9vw, 130px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; }
.detail__date { margin-top: 18px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.detail__desc { padding: 0 var(--pad); max-width: 720px; font-size: clamp(18px, 2.2vw, 26px); font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; }
.detail__meta { display: flex; flex-wrap: wrap; gap: 40px; padding: 34px var(--pad); border-bottom: 1px solid var(--line); }
.detail__meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 6px; }
.detail__meta dd { font-size: 15px; }
.detail__gallery { display: flex; flex-direction: column; gap: clamp(14px, 2vw, 28px); padding: clamp(30px, 5vw, 70px) var(--pad); }
.detail__fig img { width: 100%; border-radius: 4px; }
.featured--more { margin-top: 20px; }

/* ---------------- gallery masonry ---------------- */
.masonry { columns: 3; column-gap: clamp(12px, 2vw, 24px); padding: 20px var(--pad) 80px; }
.masonry__item { break-inside: avoid; margin-bottom: clamp(12px, 2vw, 24px); }
.masonry__item img { width: 100%; border-radius: 4px; }

/* ---------------- contact ---------------- */
.page--contact { display: flex; align-items: center; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; padding: clamp(60px, 10vw, 120px) var(--pad); width: 100%; }
.contact__img img { width: 100%; max-width: 460px; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; }
.contact__body { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.contact__line { font-size: clamp(20px, 3vw, 38px); font-weight: 500; letter-spacing: -0.02em; transition: opacity 0.2s; }
.contact__line:hover { opacity: 0.55; }
.contact__ig { color: var(--muted); font-size: clamp(15px, 1.8vw, 20px); }
.contact__cta { margin-top: 18px; }

/* ---------------- 404 ---------------- */
.page--404 { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 30px; text-align: center; }
.notfound { font-size: clamp(50px, 12vw, 150px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.95; }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--line); }
.footer__marquee { overflow: hidden; padding: 26px 0; border-bottom: 1px solid var(--line); }
.footer__track { display: inline-flex; gap: 16px; animation: scroll-x 40s linear infinite; }
.footer__img { flex: 0 0 auto; width: 150px; height: 200px; }
.footer__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.footer__bar { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 24px; padding: clamp(34px, 5vw, 60px) var(--pad); align-items: start; }
.footer__top { font-size: clamp(18px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.02em; }
.footer__col { display: flex; flex-direction: column; gap: 6px; }
.footer__label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 6px; }
.footer__col a { font-size: 14px; color: var(--muted); transition: color 0.2s; }
.footer__col a:hover { color: var(--fg); }
.footer__copy { font-size: 13px; color: var(--muted); justify-self: end; }

/* ---------------- reveal anim ---------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .nav__meta { display: none; }
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0; background: #000;
    flex-direction: column; gap: 0; padding: 10px 0; border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform 0.35s; opacity: 0; pointer-events: none;
  }
  body.nav-open .nav__links { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links a { padding: 16px var(--pad); font-size: 15px; }
  .about { grid-template-columns: 1fr; }
  .about__img img { max-width: 320px; }
  .resume__row { grid-template-columns: 1fr 1fr; row-gap: 6px; }
  .resume__loc { text-align: left; }
  .workgrid { grid-template-columns: 1fr; }
  .masonry { columns: 2; }
  .contact { grid-template-columns: 1fr; }
  .footer__bar { grid-template-columns: 1fr 1fr; }
  .worklist__link { grid-template-columns: 50px 1fr; }
  .worklist__cat { display: none; }
}
@media (max-width: 480px) {
  .masonry { columns: 1; }
  .footer__bar { grid-template-columns: 1fr; }
}
