/* ==========================================================================
   张文青 · 税务律师 个人官网
   Design system: editorial / boutique premium
   1. Tokens
   2. Base & reset
   3. Layout primitives
   4. Header / navigation
   5. Hero
   6. Components (card, stat, timeline, table, accordion, quote...)
   7. Page-specific
   8. Footer
   9. Motion & responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --ink: #14171a;
  --ink-2: #2b3036;
  --ink-3: #4a5057;
  --muted: #6f6a62;
  --muted-2: #8b857b;
  --paper: #fbfaf7;
  --paper-2: #f4f0e8;
  --paper-3: #ece7dc;
  --gold: #a9854b;
  --gold-deep: #8c6b38;
  --gold-tint: rgba(169, 133, 75, 0.14);
  --line: #e3ddd1;
  --line-strong: #cfc7b8;
  --white: #ffffff;

  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC",
    "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system,
    BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, "Menlo", monospace;

  --max: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(72px, 9vw, 132px);
  --radius: 2px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 26, 0.04);
  --shadow-md: 0 18px 48px -28px rgba(20, 23, 26, 0.28);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 1.15em;
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: 0.01em;
  margin: 0 0 0.6em;
  text-wrap: pretty;
}

h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.24;
}

h2 {
  font-size: clamp(1.65rem, 2.9vw, 2.35rem);
}

h3 {
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
}

h4 {
  font-size: 1rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.04em;
}

ul,
ol {
  margin: 0 0 1.2em;
  padding-left: 1.15em;
}

li {
  margin-bottom: 0.5em;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

::selection {
  background: var(--gold-tint);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  font-size: 0.85rem;
}

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

/* 3. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

.container--narrow {
  max-width: 820px;
}

.container--article {
  max-width: 888px;
}

.section {
  padding: var(--section-y) 0;
  position: relative;
}

.section--tint {
  background: var(--paper-2);
}

.section--ink {
  background: var(--ink);
  color: #cfcabd;
}

.section--ink h1,
.section--ink h2,
.section--ink h3 {
  color: var(--paper);
}

.section--hair {
  border-top: 1px solid var(--line);
}

.grid {
  display: grid;
  gap: clamp(20px, 2.4vw, 34px);
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}

/* Section heading block */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 22px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  display: block;
}

.eyebrow--center {
  justify-content: center;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(38px, 4.5vw, 64px);
}

.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 0;
}

.lede {
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  color: var(--muted);
  line-height: 1.95;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* 4. Header ---------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(251, 250, 247, 0.88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: height 0.4s var(--ease);
}

.site-header.is-stuck .header-inner {
  height: 64px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}

.brand__name {
  font-family: var(--serif);
  font-size: 1.28rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  font-weight: 600;
}

.brand__meta {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-left: 1px solid var(--line-strong);
  padding-left: 12px;
  line-height: 1.5;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}

.nav a {
  font-size: 0.88rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  position: relative;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
  white-space: nowrap;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.36s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after,
.nav a[aria-current="page"]::after {
  width: 100%;
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 9px 18px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
  white-space: nowrap;
}

.header-cta:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.3s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 5. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  padding-top: clamp(112px, 14vh, 168px);
  padding-bottom: clamp(56px, 8vw, 96px);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -12%;
  width: 58vw;
  height: 58vw;
  max-width: 760px;
  max-height: 760px;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(169, 133, 75, 0.09),
    rgba(169, 133, 75, 0) 62%
  );
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 5vw, 76px);
  align-items: end;
}

.hero__kicker {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.hero__kicker::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  font-size: clamp(2.25rem, 4.6vw, 3.62rem);
  line-height: 1.22;
  letter-spacing: 0.02em;
  margin-bottom: 0.42em;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold-deep);
  position: relative;
  white-space: nowrap;
}

.hero__sub {
  font-family: var(--serif);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--ink-3);
  letter-spacing: 0.06em;
  margin-bottom: 22px;
}

.hero__desc {
  max-width: 44ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.95;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: all 0.38s var(--ease);
  cursor: pointer;
  font-family: var(--sans);
}

.btn:hover {
  background: var(--gold-deep);
  border-color: var(--gold-deep);
  color: var(--paper);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--light {
  background: transparent;
  border-color: rgba(251, 250, 247, 0.4);
  color: var(--paper);
}

.btn--light:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.38s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

/* Portrait frame */
.portrait {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 400px;
}

.portrait__frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-3);
  aspect-ratio: 4 / 5;
}

.portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 5%;
  transition: transform 1.2s var(--ease);
}

.portrait:hover .portrait__frame img {
  transform: scale(1.03);
}

.portrait__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(20, 23, 26, 0.08);
  pointer-events: none;
}

.portrait__outline {
  position: absolute;
  inset: 16px -16px -16px 16px;
  border: 1px solid var(--gold);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

.portrait__tag {
  position: absolute;
  left: -26px;
  bottom: -22px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 16px 22px;
  box-shadow: var(--shadow-md);
  max-width: 240px;
}

.portrait__tag strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: 0.06em;
}

.portrait__tag span {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: block;
  margin-top: 4px;
}

/* Credential strip */
.cred-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: clamp(48px, 6vw, 80px);
  padding: 26px 0;
}

.cred-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.cred {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.cred:first-child {
  border-left: 0;
  padding-left: 0;
}

.cred__label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.cred__value {
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* 6. Components ------------------------------------------------------------ */
/* Practice card */
.pcard {
  border: 1px solid var(--line);
  background: var(--white);
  padding: clamp(24px, 2.6vw, 34px);
  position: relative;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pcard::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  width: 0;
  background: var(--gold);
  transition: width 0.5s var(--ease);
}

.pcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.pcard:hover::before {
  width: 100%;
}

.pcard__no {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  margin-bottom: 16px;
}

.pcard h3 {
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.pcard p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.9;
  margin-bottom: 16px;
}

.pcard__list {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  font-size: 0.85rem;
  color: var(--ink-3);
}

.pcard__list li {
  padding: 7px 0;
  border-top: 1px dashed var(--line);
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.pcard__list li::before {
  content: "—";
  color: var(--gold);
  flex-shrink: 0;
}

/* Stat */
.stat {
  text-align: left;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.stat__num {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: 0.01em;
  display: block;
}

.stat__num small {
  font-size: 0.9rem;
  color: var(--gold-deep);
  margin-left: 5px;
  letter-spacing: 0.06em;
}

.stat__label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 8px;
  display: block;
  letter-spacing: 0.04em;
}

/* Index list (cases / articles) */
.index-list {
  border-top: 1px solid var(--line);
}

.index-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: start;
  padding: clamp(24px, 3vw, 34px) 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease);
  position: relative;
}

.index-item:hover {
  background: rgba(244, 240, 232, 0.55);
  padding-left: 16px;
  padding-right: 16px;
}

.index-item__meta {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding-top: 6px;
}

.index-item__meta span {
  display: block;
  color: var(--muted-2);
  margin-top: 6px;
  letter-spacing: 0.1em;
}

.index-item h3 {
  margin-bottom: 8px;
  transition: color 0.3s var(--ease);
}

.index-item:hover h3 {
  color: var(--gold-deep);
}

.index-item p {
  color: var(--muted);
  font-size: 0.91rem;
  margin: 0;
  max-width: 60ch;
}

.index-item__arrow {
  font-family: var(--mono);
  color: var(--line-strong);
  font-size: 1.1rem;
  padding-top: 4px;
  transition: transform 0.4s var(--ease), color 0.4s var(--ease);
}

.index-item:hover .index-item__arrow {
  transform: translateX(6px);
  color: var(--gold);
}

/* Tag */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  background: var(--gold-tint);
  padding: 3px 10px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.tag--plain {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

/* Feature quote */
.quote {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 28px;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.9vw, 1.42rem);
  line-height: 1.85;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.quote cite {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-style: normal;
  margin-top: 18px;
}

/* Timeline (process) */
.timeline {
  position: relative;
  padding-left: clamp(28px, 5vw, 60px);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line-strong);
}

.tl-item {
  position: relative;
  padding-bottom: clamp(34px, 4.4vw, 54px);
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(28px, 5vw, 60px) + 1px);
  top: 10px;
  width: 9px;
  height: 9px;
  background: var(--paper);
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.tl-item__no {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--gold-deep);
  display: block;
  margin-bottom: 8px;
}

.tl-item h3 {
  margin-bottom: 8px;
}

.tl-item p {
  color: var(--muted);
  margin-bottom: 10px;
  max-width: 62ch;
}

.tl-item ul {
  color: var(--ink-3);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* Accordion */
.acc {
  border-top: 1px solid var(--line);
}

.acc__item {
  border-bottom: 1px solid var(--line);
}

.acc__btn {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 24px 44px 24px 0;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: var(--ink);
  cursor: pointer;
  position: relative;
  letter-spacing: 0.02em;
  line-height: 1.6;
  transition: color 0.3s var(--ease);
}

.acc__btn:hover {
  color: var(--gold-deep);
}

.acc__btn::-webkit-details-marker {
  display: none;
}

.acc__btn::marker {
  content: "";
}

.acc__btn::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 11px;
  height: 11px;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.4s var(--ease);
}

.acc__item[open] .acc__btn::after {
  transform: translateY(-30%) rotate(-135deg);
}

.acc__body {
  padding: 0 56px 26px 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.95;
  animation: fadeSlide 0.45s var(--ease);
}

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

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 620px;
}

thead th {
  background: var(--paper-2);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

tbody td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  vertical-align: top;
  line-height: 1.8;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(244, 240, 232, 0.5);
}

td strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  margin-bottom: 2px;
}

/* Note callout */
.note {
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  background: var(--paper-2);
  padding: 22px 26px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.9;
}

.note strong {
  color: var(--ink-2);
}

/* Case block */
/* Topic list (two-column flow) */
.topic-list {
  columns: 2;
  column-gap: clamp(28px, 4vw, 56px);
  margin-top: 20px;
}

.topic-list li {
  break-inside: avoid;
  margin-bottom: 16px;
  padding-left: 0;
}

@media (max-width: 900px) {
  .topic-list {
    columns: 1;
  }
}

/* Inline emphasis inside index lists */
.index-item p em {
  font-style: normal;
  color: var(--gold-deep);
  font-weight: 600;
}

/* Case groups */
.case-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin: clamp(46px, 5.6vw, 72px) 0 clamp(4px, 1vw, 10px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.case-group-head:first-of-type {
  margin-top: 0;
}

.case-group-head h2 {
  font-size: clamp(1.32rem, 2.2vw, 1.62rem);
  margin: 0;
  letter-spacing: 0.02em;
}

.case-group-head span {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.case-card__fig {
  font-family: var(--serif);
  font-size: clamp(1.42rem, 2.5vw, 1.86rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: var(--gold-deep);
  margin: 2px 0 clamp(20px, 2.4vw, 28px);
}

.case-card__fig small {
  display: block;
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--muted-2);
  margin-top: 8px;
}

.case-card {
  border-top: 1px solid var(--line);
  padding: clamp(28px, 3.4vw, 44px) 0;
  transition: background 0.4s var(--ease);
}

.case-card:last-of-type {
  border-bottom: 1px solid var(--line);
}

.case-card__head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.case-card__no {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--gold-deep);
}

.case-card h3 {
  margin-bottom: 18px;
  font-size: clamp(1.1rem, 1.7vw, 1.32rem);
}

.case-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 40px);
  margin: 0;
}

.case-detail dt {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.case-detail dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--ink-3);
}

.case-detail dd em {
  font-style: normal;
  color: var(--gold-deep);
  font-weight: 600;
}

@media (max-width: 900px) {
  .case-detail {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Filter tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.tab {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-3);
  padding: 8px 18px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-family: var(--sans);
}

.tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Page header */
.page-head {
  padding-top: clamp(120px, 15vh, 170px);
  padding-bottom: clamp(38px, 5vw, 62px);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.page-head::after {
  content: "";
  position: absolute;
  right: -6%;
  top: -40%;
  width: 42vw;
  height: 42vw;
  max-width: 560px;
  max-height: 560px;
  background: radial-gradient(
    circle,
    rgba(169, 133, 75, 0.08),
    transparent 65%
  );
  pointer-events: none;
}

.page-head h1 {
  margin-bottom: 18px;
}

.page-head .lede {
  max-width: 66ch;
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.breadcrumb a {
  color: var(--muted-2);
  transition: color 0.3s var(--ease);
}

.breadcrumb a:hover {
  color: var(--gold-deep);
}

.breadcrumb span {
  margin: 0 8px;
  color: var(--line-strong);
}

/* CTA band */
.cta-band {
  background: var(--ink);
  color: #cfcabd;
  padding: clamp(56px, 7vw, 92px) 0;
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 82% 30%,
    rgba(169, 133, 75, 0.18),
    transparent 55%
  );
  pointer-events: none;
}

.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.cta-band h2 {
  color: var(--paper);
  margin-bottom: 10px;
}

.cta-band p {
  margin: 0;
  color: #a8a294;
  max-width: 56ch;
}

/* 7. Page-specific --------------------------------------------------------- */
/* About page */
.fact-card {
  border: 1px solid var(--line);
  background: var(--white);
  padding: clamp(26px, 3vw, 40px);
}

.fact-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.9rem;
  align-items: baseline;
}

.fact-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fact-row dt {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.fact-row dd {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.75;
}

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

.cv-item__year {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  padding-top: 4px;
}

.cv-item h3 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.cv-item p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line-strong);
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  transition: all 0.3s var(--ease);
}

.chip:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

/* Form */
.form-row {
  margin-bottom: 18px;
}

.form-row label {
  display: block;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 8px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-2);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.form-row textarea {
  resize: vertical;
  line-height: 1.8;
}

.form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236f6a62' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #b3aca0;
}

/* Article */
.article {
  max-width: 760px;
  margin: 0 auto;
}

.article__body {
  font-size: 1.02rem;
  line-height: 2.05;
  color: var(--ink-2);
}

.article__body h2 {
  margin-top: 2.2em;
  margin-bottom: 0.7em;
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  padding-top: 0.4em;
  border-top: 1px solid var(--line);
}

.article__body h3 {
  margin-top: 1.8em;
  font-size: 1.1rem;
}

.article__body ul,
.article__body ol {
  color: var(--ink-360, var(--ink-3));
  padding-left: 1.3em;
}

.article__body li {
  margin-bottom: 0.55em;
}

.article__body blockquote {
  margin: 2em 0;
  padding: 20px 26px;
  background: var(--paper-2);
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
}

.article__body blockquote p:last-child {
  margin-bottom: 0;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  text-transform: uppercase;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.article__footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: var(--muted);
}

.toc {
  border: 1px solid var(--line);
  background: var(--paper-2);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc h2 {
  font-family: var(--sans);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}

.toc ol {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.9rem;
  color: var(--ink-3);
}

.toc li {
  margin-bottom: 6px;
}

.toc a:hover {
  color: var(--gold-deep);
}

/* 8. Footer ---------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #9d978a;
  padding: clamp(52px, 6vw, 84px) 0 0;
  font-size: 0.88rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

.site-footer h3 {
  color: var(--paper);
  font-size: 0.76rem;
  font-family: var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 500;
}

.site-footer p {
  line-height: 1.9;
  margin-bottom: 12px;
}

.site-footer a {
  color: #9d978a;
  transition: color 0.3s var(--ease);
}

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

.footer-brand__name {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--paper);
  letter-spacing: 0.16em;
  display: block;
  margin-bottom: 8px;
}

.footer-brand__line {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-contact li {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: baseline;
}

.footer-contact span {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d675c;
}

.footer-bottom {
  border-top: 1px solid rgba(251, 250, 247, 0.1);
  padding: 22px 0 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  justify-content: space-between;
  font-size: 0.76rem;
  color: #77716a;
}

.footer-bottom a {
  color: #77716a;
}

.footer-legal {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
}

.footer-icp {
  transition: color 0.2s ease;
}

.footer-icp:hover {
  color: #b08a4f;
}

.footer-disclaimer {
  font-size: 0.74rem;
  color: #6b665d;
  line-height: 1.8;
  margin-top: 14px;
  max-width: 76ch;
}

/* 9. Motion & responsive --------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1080px) {
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cred-strip__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 22px;
  }
  .cred:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .nav {
    position: fixed;
    inset: 0 0 auto 0;
    top: 64px;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px var(--gutter) 30px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.98rem;
  }
  .nav a::after {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .header-cta {
    display: none;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .portrait {
    justify-self: start;
    max-width: 320px;
    order: 2;
  }
  .portrait__tag {
    position: static;
    margin-top: 28px;
    max-width: 100%;
    box-shadow: none;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }
  .index-item {
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .index-item__meta {
    grid-column: 1 / -1;
    padding-top: 0;
  }
  .cv-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }
  .header-inner {
    height: 64px;
  }
  .brand__meta {
    display: none;
  }
  .grid--4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cred-strip__inner {
    grid-template-columns: 1fr;
  }
  .cred {
    border-left: 0;
    padding-left: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
  }
  .cred:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
  .portrait__outline {
    inset: 10px -10px -10px 10px;
  }
  .fact-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
