/* javen.work — prototype stylesheet
   Tokens follow docs/03-設計方向.md
   Zero dependencies: system font stacks only. */

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --text: #141414;
  --text-muted: #5f5f5c;
  --line: #e4e4df;
  --accent: #0f6b5c;
  --accent-ink: #ffffff;
  --tbc-bg: #f3f1e6;
  --tbc-line: #b9a97a;
  --tbc-text: #6b5a1f;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --max: 1120px;
  --read: 720px;
  --header-h: 64px;
  --radius: 10px;
  --ease: 150ms ease;
}

:root[data-theme="dark"] {
  --bg: #0c0c0d;
  --surface: #151516;
  --text: #f2f2f0;
  --text-muted: #9a9a96;
  --line: #2a2a2c;
  --accent: #5fd3be;
  --accent-ink: #062b25;
  --tbc-bg: #201d14;
  --tbc-line: #6f6238;
  --tbc-text: #d8c88f;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 6px;
  font-size: 14px;
  transition: top var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- prototype notice ---------- */

.notice {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.notice__inner {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.notice strong {
  color: var(--text);
  font-weight: 500;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: 8px;
}

.nav a {
  font-size: 14px;
  color: var(--text-muted);
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* language segmented control */
.lang {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.lang a,
.lang span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.lang a:hover {
  color: var(--text);
  text-decoration: none;
}

.lang .is-current {
  background: var(--text);
  color: var(--bg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}

.theme-toggle:hover {
  border-color: var(--line);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (min-width: 860px) {
  .controls .theme-toggle {
    width: 36px;
    height: 36px;
  }
}

/* ---------- layout ---------- */

main {
  display: block;
}

.section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}

.section:last-of-type {
  border-bottom: 0;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
}

h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: var(--read);
}

p {
  margin: 0 0 16px;
}

p:last-child {
  margin-bottom: 0;
}

/* ---------- hero ---------- */

.hero {
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--line);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.hero__body {
  max-width: 780px;
}

.hero h1 {
  margin: 14px 0 20px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 680;
  max-width: 20ch;
}

.hero__sub {
  max-width: 58ch;
  color: var(--text-muted);
  font-size: 17px;
}

.hero__note {
  margin: 20px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 550;
  border: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  text-decoration: none;
  filter: brightness(1.06);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
}

.btn--ghost:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 1;
}

/* portrait slot — reserved for when a photo exists (see .hero--with-photo) */
.hero__portrait {
  margin: 0;
}

.hero__portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* ---------- TBC marks ---------- */

.tbc {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tbc-text);
  background: var(--tbc-bg);
  border: 1px dashed var(--tbc-line);
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: middle;
  white-space: nowrap;
}

.pending {
  border: 1px dashed var(--tbc-line);
  background: var(--tbc-bg);
  color: var(--tbc-text);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.55;
}

.pending strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ---------- roles ---------- */

.roles {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.role {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.role__org {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.role__title {
  color: var(--text-muted);
  font-size: 15px;
}

.role__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.role__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.role a {
  font-size: 13px;
}

/* ---------- community ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--read);
}

.timeline li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.timeline time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.04em;
  padding-top: 2px;
}

.timeline p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.timeline strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- now / contact ---------- */

.now p {
  max-width: var(--read);
}

.contact {
  display: grid;
  gap: 20px;
  align-items: start;
}

.contact__big {
  display: inline-block;
  font-size: clamp(22px, 3.4vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 620;
  color: var(--text);
  word-break: break-word;
}

.contact__hint {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 52ch;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 40px 0 56px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer__inner .lang {
  margin-left: auto;
}

.site-footer a {
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--accent);
}

/* ---------- responsive ---------- */

@media (max-width: 859px) {
  .nav {
    display: none;
  }

  .hero {
    padding: 48px 0 64px;
  }

  .section {
    padding: 64px 0;
  }

  .section__head {
    margin-bottom: 28px;
  }

  h2 {
    font-size: 24px;
  }

  .notice__inner {
    font-size: 10px;
    line-height: 1.4;
  }
}

@media (min-width: 860px) {
  .hero--with-photo .hero__grid {
    grid-template-columns: 1.45fr 0.75fr;
    gap: 64px;
  }

  .role {
    grid-template-columns: minmax(200px, 1.05fr) minmax(160px, 1fr) minmax(264px, auto);
    align-items: baseline;
  }

  .role__meta {
    justify-content: flex-end;
  }

  .contact {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
