/* Bryan Lam Law Office — blamlaw.com */
:root {
  --paper: #F4F6F8;
  --paper-2: #E7EBEF;
  --ink: #2A3A4B;      /* matches logo */
  --ink-2: #43546A;
  --muted: #627285;
  --rule: #C9D1DA;
  --serif: "Newsreader", "Noto Serif TC", Georgia, serif;
  --sans: "Public Sans", "Noto Sans TC", system-ui, sans-serif;
  --measure: 34rem;
}
html:lang(zh-Hant) {
  --serif: "Noto Serif TC", "Newsreader", serif;
  --sans: "Noto Sans TC", "Public Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
html:lang(zh-Hant) body { line-height: 1.85; letter-spacing: 0.02em; }
a { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; }
.brand { display: flex; align-items: center; gap: .6rem; line-height: 0; }
.brand img { width: auto; display: block; }
.brand-mark { height: 2.45rem; }
.brand-word { height: 3.1rem; }
.nav { display: flex; align-items: center; gap: 1.6rem; font-size: .95rem; flex-wrap: wrap; }
.nav a { text-decoration: none; padding: .25rem 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--ink); }
.nav .lang { border: 1px solid var(--rule); padding: .2rem .7rem; border-radius: 2px; }
.nav .lang:hover { border-color: var(--ink); }

/* Home hero */
.hero { display: block; padding: 5.5rem 0 4.5rem; align-items: start; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 5.2vw, 4.1rem); line-height: 1.08; letter-spacing: -0.012em; margin: 0 0 1.75rem; max-width: 16ch; }
html:lang(zh-Hant) .hero h1 { letter-spacing: .02em; line-height: 1.3; max-width: 14em; font-weight: 500; }
.lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); max-width: var(--measure); margin: 0; }

/* Sections */
.section { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.section h2 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.2; margin: 0 0 1.75rem; }
html:lang(zh-Hant) .section h2 { font-weight: 500; }
.split { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 2.5rem; }
.split > h2 { margin: 0; }

.areas { margin: 0; }
.areas > div { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; padding: 1.4rem 0; border-top: 1px solid var(--rule); }
.areas > div:first-child { border-top: 0; padding-top: 0; }
.areas dt { font-family: var(--serif); font-size: 1.25rem; line-height: 1.35; }
.areas dd { margin: 0; color: var(--ink-2); max-width: var(--measure); }
.more { margin: 1.75rem 0 0; }

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.1rem; }
.prose ul { padding-left: 1.1rem; margin: 0 0 1.25rem; }
.prose li { margin: 0 0 .45rem; }
.prose li::marker { color: var(--muted); }
.prose h3 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; margin: 2rem 0 .6rem; }
html:lang(zh-Hant) .prose h3 { font-weight: 500; }
.prose h3:first-child { margin-top: 0; }

/* Inner pages */
.page-head { padding: 4.5rem 0 2.5rem; }
.page-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.1rem, 4.4vw, 3.2rem); line-height: 1.1; margin: 0 0 .5rem; }
html:lang(zh-Hant) .page-head h1 { font-weight: 500; letter-spacing: .04em; }
.page-head .sub { color: var(--muted); margin: 0; font-size: 1.1rem; }

/* columns match .split so the photo lines up with the body text below */
.profile-head { display: grid; grid-template-columns: 16rem minmax(0, 1fr); align-items: end; gap: 2.5rem; }
.profile-head > div { grid-column: 1; grid-row: 1; }
.profile-head h1 { white-space: nowrap; }
.profile-head > .portrait { grid-column: 2; grid-row: 1; justify-self: start; }
.portrait { width: 12rem; height: 12rem; object-fit: cover; display: block; border-radius: 2px; background: var(--paper-2); }

.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1.5rem; padding: .9rem 0; border-top: 1px solid var(--rule); }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.note { background: var(--paper-2); padding: 1.1rem 1.25rem; max-width: var(--measure); font-size: .95rem; color: var(--ink-2); margin: 2rem 0 0; border-left: 2px solid var(--ink); }

.contact-strip { display: flex; flex-wrap: wrap; gap: .5rem 2.5rem; font-size: 1.05rem; }
.contact-strip a { font-family: var(--serif); font-size: 1.3rem; }

/* Footer */
.site-foot { background: var(--ink); color: #D5DCE4; font-size: .9rem; margin-top: 4rem; }
.site-foot .wrap { padding-top: 2.5rem; padding-bottom: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; }
.site-foot p { margin: 0 0 .4rem; max-width: 40rem; }
.site-foot a { color: #F4F6F8; text-decoration-color: #7D8DA0; }
.site-foot nav { display: flex; gap: 1.5rem; align-items: flex-start; }

@media (max-width: 52rem) {
  .hero { padding: 3.5rem 0 3rem; }
    .brand-mark { height: 1.9rem; }
  .brand-word { height: 2.4rem; }
  .brand { gap: .45rem; }
  .split, .areas > div, .facts > div { grid-template-columns: 1fr; gap: .4rem; }
  .split { gap: 1.5rem; }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .profile-head { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 1.25rem; }
  .portrait { width: 7rem; height: 7rem; }
  .nav { gap: 1.1rem; }
}
@media print {
  .site-head nav, .site-foot nav, .skip { display: none; }
  .site-foot { background: none; color: #000; }
}
