/* ============================================
   Abel Toolkit — Design Tokens
   Brand: 太空靛藍 / 鋼藍 / 薄荷奶油 / 卡其米色 / 灰褐色
   ============================================ */
:root {
  /* Brand palette */
  --c-ink: #283044;          /* 太空靛藍 — primary */
  --c-steel: #78A1BB;        /* 鋼藍 — accent */
  --c-cream: #EBF5EE;        /* 薄荷奶油 — surface */
  --c-khaki: #BFA89E;        /* 卡其米色 — secondary */
  --c-mocha: #8B786D;        /* 灰褐色 — muted */

  /* Semantic */
  --bg: #F6F8F4;
  --bg-soft: #EFF3EC;
  --surface: #FFFFFF;
  --surface-2: #FBFBF8;
  --border: rgba(40, 48, 68, 0.08);
  --border-strong: rgba(40, 48, 68, 0.16);
  --text: #283044;
  --text-soft: #4A5468;
  --text-muted: #8B786D;
  --text-faint: #B5AEA6;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(40, 48, 68, 0.04), 0 1px 1px rgba(40, 48, 68, 0.03);
  --shadow-md: 0 4px 12px rgba(40, 48, 68, 0.06), 0 1px 2px rgba(40, 48, 68, 0.04);
  --shadow-lg: 0 16px 40px rgba(40, 48, 68, 0.10), 0 4px 12px rgba(40, 48, 68, 0.06);
  --shadow-inset: inset 0 0 0 1px rgba(40, 48, 68, 0.06);

  /* Radius */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Type */
  --f-display: 'Plus Jakarta Sans', 'Noto Sans TC', system-ui, sans-serif;
  --f-body: 'Noto Sans TC', 'Plus Jakarta Sans', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', 'Menlo', monospace;

  /* Motion */
  --t-fast: 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-base: 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-slow: 360ms cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Layout */
  --maxw: 1240px;
  --nav-h: 72px;
}

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

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

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -200px, rgba(120, 161, 187, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(191, 168, 158, 0.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input { font-family: inherit; }

/* ============================================
   Topbar
   ============================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  background: rgba(246, 248, 244, 0.78);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--s-5);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--c-ink), #3a4566);
  color: var(--c-cream);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-md);
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand__sub {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.tabs {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  padding: 6px;
  background: rgba(40, 48, 68, 0.04);
  border-radius: 999px;
  border: 1px solid var(--border);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 9px 18px;
  border-radius: 999px;
  background: transparent;
  border: 0;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 14px;
  transition: color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.tab__num {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 500;
  transition: color var(--t-fast);
}
.tab:hover { color: var(--text); background: rgba(40, 48, 68, 0.04); }
.tab.is-active {
  background: var(--c-ink);
  color: var(--c-cream);
  box-shadow: var(--shadow-md);
}
.tab.is-active .tab__num { color: var(--c-steel); }

/* ============================================
   View / Hero
   ============================================ */
.view {
  display: none;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-7) var(--s-5) var(--s-9);
  animation: fadeUp var(--t-slow);
}
.view.is-active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  padding: var(--s-6) 0 var(--s-7);
  border-bottom: 1px dashed var(--border-strong);
  margin-bottom: var(--s-6);
}
.hero__eyebrow {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--c-steel);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: var(--s-4);
  padding: 4px 10px;
  border: 1px solid rgba(120, 161, 187, 0.35);
  border-radius: 999px;
  background: rgba(120, 161, 187, 0.08);
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 var(--s-4);
  color: var(--text);
}
.hero__highlight {
  display: inline-block;
  margin-left: 0.35em;
  background: linear-gradient(120deg, var(--c-steel), var(--c-ink) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__desc {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 64ch;
  margin: 0 0 var(--s-5);
  line-height: 1.65;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.chip--ghost { background: transparent; box-shadow: none; }
.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-steel);
  box-shadow: 0 0 0 3px rgba(120, 161, 187, 0.2);
}

/* ============================================
   Toolbar (search + filters)
   ============================================ */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.search {
  position: relative;
  flex: 1 1 280px;
  min-width: 240px;
}
.search__icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  pointer-events: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.search input {
  width: 100%;
  height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0 16px 0 42px;
  font-size: 14.5px;
  color: var(--text);
  transition: border var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.search input:focus {
  outline: none;
  border-color: var(--c-steel);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(120, 161, 187, 0.2);
}
.search input::placeholder { color: var(--text-faint); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  transition: all var(--t-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.filter-btn.is-active {
  background: var(--c-ink);
  color: var(--c-cream);
  border-color: var(--c-ink);
}
.filter-btn__count {
  font-family: var(--f-mono);
  font-size: 11px;
  opacity: 0.7;
}

/* ============================================
   Terms grid
   ============================================ */
.terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-3);
}
.term-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  transition: transform var(--t-fast), box-shadow var(--t-base), border-color var(--t-fast);
  position: relative;
  overflow: hidden;
}
.term-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(120, 161, 187, 0.04));
  opacity: 0;
  transition: opacity var(--t-base);
  pointer-events: none;
}
.term-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(120, 161, 187, 0.4);
}
.term-card:hover::before { opacity: 1; }

.term-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.term-card__en {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.term-card__cat {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-steel);
  font-weight: 600;
  white-space: nowrap;
}
.term-card__zh {
  font-size: 14px;
  color: var(--c-steel);
  font-weight: 600;
  margin-bottom: var(--s-3);
}
.term-card__desc {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.65;
  margin: 0 0 var(--s-3);
}
.term-card__example {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 10px 12px;
  border-radius: var(--r-xs);
  border-left: 3px solid var(--c-khaki);
  font-style: italic;
  line-height: 1.55;
}
.term-card__example b { font-style: normal; color: var(--text-soft); font-weight: 600; }

/* ============================================
   Skills list
   ============================================ */
.skills-list { display: flex; flex-direction: column; gap: var(--s-3); }
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  transition: border-color var(--t-fast), box-shadow var(--t-base), transform var(--t-fast);
}
.skill-card:hover {
  border-color: rgba(120, 161, 187, 0.4);
  box-shadow: var(--shadow-md);
}
.skill-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.skill-card__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.skill-card__name { font-family: var(--f-mono); font-size: 15px; color: var(--c-ink); }
.skill-card__cat {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-steel);
  padding: 4px 10px;
  background: rgba(120, 161, 187, 0.12);
  border-radius: 999px;
  white-space: nowrap;
}
.skill-card__purpose {
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.65;
  margin: 0 0 var(--s-4);
}
.skill-card__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px dashed var(--border-strong);
}
.skill-card__block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skill-card__label {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}
.skill-card__when {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.6;
}
.skill-card__example {
  font-family: var(--f-mono);
  font-size: 13px;
  background: var(--bg-soft);
  padding: 10px 12px;
  border-radius: var(--r-xs);
  color: var(--text);
  line-height: 1.55;
  border-left: 3px solid var(--c-steel);
}
.skill-card__keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kw {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(40, 48, 68, 0.06);
  color: var(--text-soft);
  font-weight: 500;
}
.kw--en { background: rgba(120, 161, 187, 0.14); color: var(--c-ink); }

mark {
  background: #FFE9A8;
  color: var(--text);
  padding: 0 2px;
  border-radius: 3px;
}

/* ============================================
   Portfolio
   ============================================ */
.portfolio-section { margin-bottom: var(--s-7); }
.section-title {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.section-title__num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--c-ink);
  color: var(--c-cream);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 700;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-4);
}
.project-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t-fast), box-shadow var(--t-base), border-color var(--t-fast);
  position: relative;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(120, 161, 187, 0.4);
}
.project-card__visual {
  height: 140px;
  background:
    radial-gradient(circle at 30% 30%, rgba(120, 161, 187, 0.4), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(191, 168, 158, 0.35), transparent 50%),
    linear-gradient(135deg, var(--c-ink), #3a4566);
  position: relative;
  display: grid;
  place-items: center;
  color: var(--c-cream);
}
.project-card__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.15));
}
.project-card__emoji-mark {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 56px;
  letter-spacing: -0.04em;
  position: relative;
  z-index: 1;
  opacity: 0.92;
}
.project-card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--c-cream);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
  font-weight: 500;
}
.project-card__status {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--c-cream);
  padding: 4px 10px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
  font-weight: 500;
}
.project-card__status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.project-card__status.is-live .dot { background: #6EE7B7; box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.3); }
.project-card__status.is-local .dot { background: var(--c-khaki); }
.project-card__status.is-draft .dot { background: var(--c-mocha); }

.project-card__body {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 1;
}
.project-card__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.project-card__desc {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}
.project-card__path {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 6px 10px;
  border-radius: 6px;
  word-break: break-all;
}
.project-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink);
  margin-top: var(--s-2);
}
.project-card__cta svg { width: 14px; height: 14px; transition: transform var(--t-fast); }
.project-card:hover .project-card__cta svg { transform: translate(2px, -2px); }
.project-card__cta--muted { color: var(--text-muted); cursor: default; }

/* ============================================
   HOME
   ============================================ */
.tab__icon {
  width: 16px;
  height: 16px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--s-7);
  align-items: center;
  padding: var(--s-7) 0 var(--s-7);
  border-bottom: 1px dashed var(--border-strong);
  margin-bottom: var(--s-7);
}
.home-hero__title {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: var(--s-2) 0 var(--s-4);
  color: var(--text);
}
.home-hero__desc {
  font-size: 17.5px;
  color: var(--text-soft);
  max-width: 56ch;
  line-height: 1.7;
  margin: 0 0 var(--s-6);
}
.home-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform var(--t-fast), box-shadow var(--t-base), background var(--t-fast), color var(--t-fast);
}
.cta svg { width: 16px; height: 16px; transition: transform var(--t-fast); }
.cta--primary {
  background: var(--c-ink);
  color: var(--c-cream);
  box-shadow: var(--shadow-md);
}
.cta--primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  background: #1d2435;
}
.cta--primary:hover svg { transform: translateX(3px); }
.cta--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.cta--ghost:hover { background: var(--surface); border-color: var(--c-steel); }

.home-hero__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  text-align: left;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-base), border-color var(--t-fast);
  position: relative;
  overflow: hidden;
}
.stat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(120, 161, 187, 0.5);
}
.stat-tile::after {
  content: '→';
  position: absolute;
  top: 16px;
  right: 18px;
  color: var(--text-faint);
  font-size: 18px;
  transition: transform var(--t-fast), color var(--t-fast);
}
.stat-tile:hover::after { color: var(--c-ink); transform: translateX(3px); }
.stat-tile--alt {
  background: linear-gradient(135deg, var(--c-ink), #3a4566);
  border-color: transparent;
  color: var(--c-cream);
  grid-column: span 2;
}
.stat-tile--alt::after { color: rgba(235, 245, 238, 0.6); }
.stat-tile--alt:hover::after { color: var(--c-cream); }

.stat-tile__num {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: inherit;
}
.stat-tile--alt .stat-tile__num { color: var(--c-cream); }
.stat-tile__label {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}
.stat-tile--alt .stat-tile__label { color: var(--c-cream); }
.stat-tile__sub {
  font-size: 12.5px;
  color: var(--text-muted);
}
.stat-tile--alt .stat-tile__sub { color: rgba(235, 245, 238, 0.7); }

/* Home Sections */
.home-section { margin-bottom: var(--s-8); }
.home-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.home-section__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.02em;
  margin: var(--s-2) 0 6px;
  color: var(--text);
}
.home-section__desc {
  font-size: 15px;
  color: var(--text-soft);
  margin: 0;
  max-width: 56ch;
}
.link-btn {
  background: transparent;
  border: 0;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--c-ink);
  padding: 8px 4px;
  transition: color var(--t-fast), transform var(--t-fast);
}
.link-btn:hover { color: var(--c-steel); transform: translateX(2px); }

.home-terms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-3);
}
.home-term {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-base), border-color var(--t-fast);
}
.home-term:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(120, 161, 187, 0.4);
}
.home-term__en {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 2px;
}
.home-term__zh {
  font-size: 13px;
  color: var(--c-steel);
  font-weight: 600;
  margin-bottom: 6px;
}
.home-term__desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-skills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-3);
}
.home-skill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-base), border-color var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-skill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(120, 161, 187, 0.4);
}
.home-skill__cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-steel);
  padding: 2px 8px;
  background: rgba(120, 161, 187, 0.12);
  border-radius: 999px;
  align-self: flex-start;
}
.home-skill__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.home-skill__name {
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.home-skill__purpose {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-4);
}

/* Home Tip */
.home-tip {
  display: flex;
  align-items: flex-start;
  gap: var(--s-4);
  background: linear-gradient(135deg, rgba(120, 161, 187, 0.08), rgba(191, 168, 158, 0.08));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
}
.home-tip__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--c-ink);
  color: var(--c-cream);
  display: grid;
  place-items: center;
}
.home-tip__icon svg { width: 22px; height: 22px; stroke-linecap: round; stroke-linejoin: round; }
.home-tip__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  margin: 2px 0 var(--s-3);
  color: var(--text);
}
.home-tip__list {
  margin: 0;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.8;
}
.home-tip__list b { color: var(--c-ink); font-weight: 600; font-family: var(--f-mono); font-size: 13px; background: rgba(40,48,68,0.06); padding: 1px 6px; border-radius: 4px; }

/* ============================================
   Locked badge (on project card)
   ============================================ */
.project-card__lock {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(40, 48, 68, 0.55);
  color: var(--c-cream);
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}
.project-card__lock svg { width: 11px; height: 11px; stroke-linecap: round; stroke-linejoin: round; }

.project-card__cta--lock {
  color: var(--c-mocha);
}
.project-card__cta--lock svg { width: 14px; height: 14px; }

/* ============================================
   PIN modal
   ============================================ */
.pin-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: var(--s-4);
  animation: fadeIn 200ms ease;
}
.pin-modal[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

.pin-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 48, 68, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pin-modal__panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  padding: var(--s-7) var(--s-6) var(--s-6);
  width: min(420px, 100%);
  text-align: center;
  animation: panelIn 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pin-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 0;
  font-size: 22px;
  color: var(--text-muted);
  line-height: 1;
  transition: background var(--t-fast), color var(--t-fast);
}
.pin-modal__close:hover { background: var(--bg-soft); color: var(--text); }
.pin-modal__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--s-4);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--c-ink), #3a4566);
  color: var(--c-cream);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-md);
}
.pin-modal__icon svg { width: 26px; height: 26px; }
.pin-modal__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 var(--s-2);
}
.pin-modal__desc {
  font-size: 14.5px;
  color: var(--text-soft);
  margin: 0 0 var(--s-5);
}
.pin-modal__desc #pin-target {
  font-weight: 600;
  color: var(--c-ink);
}

.pin-input {
  display: flex;
  justify-content: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.pin-input input {
  width: 56px;
  height: 64px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--surface-2);
  font-family: var(--f-mono);
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  transition: all var(--t-fast);
  caret-color: var(--c-steel);
}
.pin-input input:focus {
  outline: none;
  border-color: var(--c-ink);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(120, 161, 187, 0.25);
}
.pin-input input.is-filled {
  border-color: var(--c-steel);
  background: #fff;
}
.pin-input.is-shake { animation: shake 360ms cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-6px); }
  30%, 70% { transform: translateX(6px); }
}
.pin-input.is-shake input { border-color: #C26B6B; background: #FFF5F5; }

.pin-modal__error {
  font-size: 13px;
  color: #C26B6B;
  font-weight: 600;
  margin: 0 0 var(--s-3);
  min-height: 1.2em;
}

.pin-modal__actions {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
}
.pin-modal__actions .cta { padding: 11px 22px; font-size: 14px; }

@media (max-width: 480px) {
  .pin-input input { width: 48px; height: 56px; font-size: 24px; }
  .pin-input { gap: var(--s-2); }
}

/* ============================================
   Empty state
   ============================================ */
.empty {
  text-align: center;
  padding: var(--s-7) var(--s-5);
  color: var(--text-muted);
  font-size: 15px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  margin-top: var(--s-8);
  background: rgba(255, 255, 255, 0.4);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--s-5) var(--s-5);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  justify-content: center;
}
.footer__dot { color: var(--text-faint); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 960px) {
  .home-hero { grid-template-columns: 1fr; gap: var(--s-5); }
}

@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  .topbar__inner { flex-direction: column; height: auto; padding: 12px var(--s-4); gap: 12px; }
  .brand__sub { display: none; }
  .tabs { width: 100%; justify-content: space-between; }
  .tab { flex: 1; justify-content: center; padding: 9px 6px; font-size: 13px; }
  .tab__num { display: none; }
  .tab__icon { width: 14px; height: 14px; }
  .view { padding: var(--s-5) var(--s-4) var(--s-8); }
  .hero { padding: var(--s-4) 0 var(--s-5); }
  .hero__title { font-size: clamp(30px, 8vw, 42px); }
  .hero__desc { font-size: 15px; }
  .home-hero { padding: var(--s-4) 0 var(--s-5); margin-bottom: var(--s-5); }
  .home-hero__title { font-size: clamp(34px, 9vw, 48px); }
  .home-hero__desc { font-size: 15px; }
  .home-section { margin-bottom: var(--s-6); }
  .home-section__head { align-items: flex-start; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .filter-btn { white-space: nowrap; }
  .terms-grid { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .home-tip { flex-direction: column; padding: var(--s-4); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* focus visibility */
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 2px solid var(--c-steel);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
