@font-face {
  font-family: 'Breton';
  src: url('../assets/fonts/Breton.woff2') format('opentype');
  font-weight: normal; font-style: normal; font-display: block;
}
@font-face {
  font-family: 'other';
  src: url('../assets/fonts/Machine.otf') format('opentype');
  font-weight: normal; font-style: normal; font-display: block;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { width: 100%; height: 100%; scrollbar-width: none; overflow: hidden; }
html::-webkit-scrollbar { display: none; }
body {
  width: 100%; height: 100vh; overflow: hidden;
  background: #0a0a0a; color: #f0f0f0;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

.other-accent { font-family: 'other', sans-serif; }

.info-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  display: block;
  z-index: 0;
}
.info-vignette {
  position: fixed; inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%),
    linear-gradient(180deg, rgba(10,10,10,0.25) 0%, rgba(10,10,10,0) 25%, rgba(10,10,10,0) 75%, rgba(10,10,10,0.35) 100%);
}

.intro-overlay {
  position: fixed; inset: 0;
  background: #0a0a0a;
  z-index: 9999;
  pointer-events: none;
}

.page-title {
  position: fixed;
  top: 3rem; left: 3rem;
  z-index: 10000;
  font-family: 'Breton', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #f0f0f0;
  line-height: 1.2;
  pointer-events: none;
  opacity: 0;
}

.back-btn {
  position: fixed;
  top: 3rem; right: 3rem;
  z-index: 100;
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
}

.chr-hover {
  display: inline-flex; gap: 0;
  cursor: pointer; text-decoration: none; color: inherit;
}
.ch-wrap { position: relative; overflow: hidden; display: inline-block; }
.ch-top, .ch-bot {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem; font-weight: 600;
  letter-spacing: 0em; text-transform: uppercase;
  line-height: 1.2;
  color: rgba(255,255,255,0.75);
  transition: transform 0.6s cubic-bezier(0.87, 0, 0.13, 1), color 0.3s ease;
  transition-delay: calc(var(--i) * 28ms);
}
.info-mail .ch-top,
.info-mail .ch-bot { text-transform: lowercase; }
.ch-bot { position: absolute; top: 100%; left: 0; }
.chr-hover:hover .ch-top { transform: translateY(-100%); }
.chr-hover:hover .ch-bot { transform: translateY(-100%); }
.chr-hover:hover .ch-top,
.chr-hover:hover .ch-bot { color: rgba(255,255,255,0.9); }

.info-main {
  position: fixed;
  inset: 0;
  z-index: 10;
  padding: clamp(6rem, 12vh, 9rem) clamp(2rem, 6vw, 6rem) clamp(4rem, 8vh, 6rem);
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  opacity: 0;
  pointer-events: none;
}
.info-main.ready { pointer-events: auto; }

.info-left {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-self: center;
}
.info-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 60vh;
  overflow: hidden;
  background: #0a0a0a;
}
.info-photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none; user-select: none;
}

.frame-corner {
  position: absolute;
  width: 14px; height: 14px;
  z-index: 5;
  pointer-events: none;
}
.frame-corner::before,
.frame-corner::after {
  content: ''; position: absolute; background: #fff;
}
.frame-corner::before { width: 1px; height: 100%; left: 50%; transform: translateX(-50%); }
.frame-corner::after  { height: 1px; width: 100%; top: 50%; transform: translateY(-50%); }
.frame-corner.tl { top: 8px; left: 8px; }
.frame-corner.tr { top: 8px; right: 8px; }
.frame-corner.bl { bottom: 8px; left: 8px; }
.frame-corner.br { bottom: 8px; right: 8px; }

.info-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 0.55rem;
}
.info-meta-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.info-meta-value {
  font-family: 'Breton', sans-serif;
  font-size: 0.95rem;
  color: #f0f0f0;
  text-align: right;
}

.info-right {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 2.5vh, 2.2rem);
  align-self: center;
  max-width: 980px;
}
.info-headline { display: flex; flex-direction: column; gap: 0.6rem; }
.info-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.info-name {
  font-family: 'Breton', sans-serif;
  font-weight: 300;
  font-size: clamp(3rem, 6.5vw, 6rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: #f0f0f0;
}
.info-role {
  font-family: 'Breton', sans-serif;
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.4;
  color: rgba(255,255,255,1);
  max-width: 40rem;
}
.info-desc {
  font-family: 'Breton', sans-serif;
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255,255,255,1);
  max-width: 42rem;
}

.info-skills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2.4rem);
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.skill-col-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.7rem;
}
.skill-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.skill-col li {
  font-family: 'Breton', sans-serif;
  font-size: 0.95rem;
  line-height: 1.35;
  color: rgba(255,255,255,0.82);
}

.info-bottom {
  position: fixed;
  bottom: 2rem; left: 3rem; right: 3rem;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
}
.info-mail { font-size: 0.9rem; }
.info-version {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 960px) {
  .info-main {
    grid-template-columns: 1fr;
    padding: clamp(5rem, 10vh, 7rem) 1.5rem 5rem;
    gap: 1.5rem;
    align-content: start;
    overflow-y: auto;
  }
  .info-photo-wrap { max-height: 40vh; }
  .info-skills { grid-template-columns: repeat(2, 1fr); }
  .info-bottom { left: 1.5rem; right: 1.5rem; }
  .page-title, .back-btn { top: 1.5rem; }
  .page-title { left: 1.5rem; }
  .back-btn { right: 1.5rem; }
}

.contact-main {
  grid-template-columns: minmax(280px, 360px) 1fr;
}

.contact-panel {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 8, 0.48);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.contact-panel-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.contact-status {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.contact-status-dot {
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 50%;
  background: #ff3b14;
  box-shadow: 0 0 12px rgba(255, 59, 20, 0.7);
}

.contact-panel-title {
  font-family: 'Breton', sans-serif;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #f0f0f0;
}

.contact-panel-copy {
  font-family: 'Breton', sans-serif;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
}

.contact-link {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  transition: color 0.25s ease;
}

.contact-link:hover {
  color: #ff6a4f;
}

.contact-direct {
  margin-top: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.contact-direct-copy {
  font-family: 'Breton', sans-serif;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

.contact-direct-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
}

@media (max-width: 960px) {
  .contact-main {
    grid-template-columns: 1fr;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body.jstar-page .language-picker { position: relative; flex-shrink: 0; }
body.jstar-page .hero-bar { align-items: center; }
body.jstar-page .hero-bar:has(.language-trigger[aria-expanded="true"]) { clip-path: none !important; }
body.jstar-page .language-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 0 0 20px;
  border: 0;
  border-left: 1px solid #52627a;
  background: transparent;
  color: #f4f7fb;
  font: 500 14px/1.4 Inter, sans-serif;
  cursor: pointer;
}
body.jstar-page .language-trigger[aria-expanded="true"],
body.jstar-page .language-trigger:hover { color: #4388ff; }
body.jstar-page .language-chevron {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transform-box: view-box;
  transform-origin: 50% 50%;
  transition: transform 150ms;
}
body.jstar-page .language-trigger[aria-expanded="false"] .language-chevron { transform: rotate(180deg); }
body.jstar-page .language-options {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 190px;
  padding: 6px;
  border: 1px solid #35445b;
  border-radius: 6px;
  background: #07101c;
  z-index: 20;
  box-shadow: 0 8px 28px #0003;
}
body.jstar-page .language-options[hidden] { display: none; }
body.jstar-page .language-options button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #d6dfec;
  font: 400 14px/1.5 Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  text-align: left;
  cursor: pointer;
}
body.jstar-page .language-options button::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: transparent;
}
body.jstar-page .language-options button[aria-pressed="true"]::before { background: #4388ff; }
body.jstar-page .language-options button:hover,
body.jstar-page .language-options button:focus-visible { background: #15253b; }
body.jstar-page .language-picker button:focus-visible { outline: 1px solid #4388ff; outline-offset: 2px; }
body.jstar-page .hero-bar-right { align-items: center; gap: clamp(14px, 1.6vw, 28px); }
body.jstar-page .footer-language { position: absolute; z-index: 3; right: 3.5vw; bottom: 1.1rem; }
html[lang^="zh"] body.jstar-page { font-family: Inter, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
html[lang="zh-TW"] body.jstar-page { font-family: Inter, 'PingFang TC', 'Microsoft JhengHei', sans-serif; }
html[lang^="zh"] .jstar-page :is(.about-text, .about-sub, .reveal-phrase, .cg-phrase, .skills-text, .skills-subtitle, .skill-header-title, .contact-title, .contact-dispo, .ch-top, .ch-bot) {
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
}
html[lang^="zh"] .jstar-page :is(.hero-tagline, .about-text, .cg-phrase, .contact-dispo) .other-accent {
  font-family: 'JSTAR Kai SC', 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', 'Kaiti TC', 'DFKai-SB', serif;
  font-style: normal;
  font-weight: 400;
}
html[lang^="zh"] .jstar-page :is(.about-text, .cg-phrase) { line-height: 1.35; }
html[lang="zh-TW"] .jstar-page :is(.hero-tagline, .about-text, .cg-phrase, .contact-dispo) .other-accent {
  font-family: 'JSTAR Kai TC', 'Kaiti TC', 'BiauKaiTC', 'DFKai-SB', '標楷體', 'STKaiti', 'KaiTi', serif;
}
html[lang^="zh"] .jstar-page .contact-dispo p { line-height: 1.65; }
html[lang="fr"] .jstar-page .contact-dispo { width: 18%; }
html[lang="fr"] .jstar-page .contact-dispo p { font-size: clamp(16px, 1.65vw, 27px); line-height: 1.25; }
body.jstar-page .detail-desc { overflow-wrap: anywhere; color: #b5c0d0; }
@media (max-width: 1180px) and (min-width: 769px) {
  body.jstar-page .hero-bar-center { gap: 10px; }
  body.jstar-page .hero-bar-right { gap: 12px; }
  body.jstar-page .language-trigger { padding-left: 12px; }
}
@media (max-width: 768px) {
  body.jstar-page .detail-title-wrap { flex-wrap: wrap; }
  body.jstar-page .detail-title { font-size: clamp(28px, 10vw, 48px); white-space: normal; overflow-wrap: anywhere; }
  body.jstar-page .hero-bar-right { display: flex; }
  body.jstar-page .hero-bar-right > a { display: none; }
  body.jstar-page .hero-bar-center { margin: 0; gap: 14px; }
  body.jstar-page .language-trigger { min-height: 44px; padding-left: 14px; }
  html[lang="fr"] .jstar-page .contact-dispo { width: 85%; }
  html[lang="fr"] .jstar-page .contact-dispo p { font-size: 20px; line-height: 1.4; }
}
@media (max-width: 600px) {
  body.jstar-page .footer-language { right: 7vw; bottom: 10vh; }
  body.jstar-page .footer-credit { right: 7vw; }
  body.jstar-page .footer-language .language-trigger { padding-left: 10px; font-size: 12px; }
}
/* Preserve the reference CONTACT panel composition. */
body { background: #07101c; }
.contact-navigation { position: fixed; top: 3rem; right: 3rem; z-index: 10001; display: flex; align-items: center; gap: 24px; }
.contact-navigation .back-btn { position: static; }
.contact-left, .contact-right { min-width: 0; }
.contact-panel { background: #07101c80; }
.contact-panel-title { line-height: 1.3; }
.contact-main .info-role { text-wrap: balance; }
.contact-main .info-name { font-size: clamp(3rem, 5.8vw, 5.5rem); line-height: 1.05; }
.contact-email { color: #f0f0f0; font: 300 clamp(1.45rem, 3.1vw, 3rem)/1.3 'Breton', sans-serif; letter-spacing: -0.03em; text-decoration-thickness: 1px; text-underline-offset: 0.2em; overflow-wrap: anywhere; }
.contact-email:hover, .contact-link:hover { color: #93c4ff; }
.contact-email-row { display: flex; flex-direction: column; align-items: flex-start; gap: 0.8rem; }
.copy-row { display: flex; align-items: center; gap: 1rem; min-height: 44px; }
.copy-email { border: 1px solid #ffffff30; border-radius: 0; background: transparent; color: #e4eaf2; padding: 10px 14px; font: 400 0.8rem/1.4 Inter, sans-serif; cursor: pointer; }
.copy-email:hover { background: #ffffff12; }
.copy-status { color: #c2d9f8; font-size: 0.8rem; }
.contact-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-link { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; }
.contact-bottom-link { color: #ffffffa0; font-size: 0.85rem; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid #93c4ff; outline-offset: 5px; }
html[lang^="zh"] .contact-main .info-name { line-height: 1.25; letter-spacing: 0; }
html[lang^="zh"] .contact-panel-copy, html[lang^="zh"] .info-role { line-height: 1.8; }
html[lang^="zh"] .info-meta-label { letter-spacing: 0.04em; }
html[lang="zh-CN"] .contact-main .other-accent { font-family: 'JSTAR Kai SC', 'Kaiti SC', STKaiti, KaiTi, serif; font-style: normal; }
html[lang="zh-TW"] .contact-main .other-accent { font-family: 'JSTAR Kai TC', 'Kaiti TC', BiauKaiTC, DFKai-SB, STKaiti, serif; font-style: normal; }
@media (max-width: 960px) {
  .contact-navigation { top: 1.5rem; right: 1.5rem; gap: 16px; }
  .page-title { font-size: 1.8rem; top: 1.5rem; }
  .contact-main { top: 6rem; padding: 1rem 1.5rem 5rem; gap: 2.5rem; }
  .contact-right { order: -1; }
  .contact-main .info-name { font-size: clamp(2.8rem, 8vw, 4.5rem); }
  .info-bottom { bottom: 0; padding: 1.25rem 0; background: linear-gradient(transparent, #07101c 50%); }
  .info-version { letter-spacing: 0.02em; }
}
@media (max-width: 360px) {
  .page-title { font-size: 1.4rem; top: 1.8rem; }
  .contact-navigation { gap: 10px; }
  .contact-navigation .ch-top, .contact-navigation .ch-bot { font-size: 0.9rem; }
}
@media (min-width: 961px) and (max-height: 720px) {
  .contact-main { top: 8rem; padding-top: 1rem; overflow-y: auto; align-items: start; }
}
