/* albertyang.net — 64-4 house style (paper / ink / deep teal) */

:root {
  color-scheme: light;
  --bg: #F4F1EA;
  --panel: #EFE8DA;
  --panel-2: #E7DFCF;
  --text: #242321;
  --muted: #6F6A64;
  --soft: #8A8580;
  --faint: #B4AFA6;
  --accent: #1F5E5A;
  --accent-2: #17433F;
  --steel: #A79F92;
  --line: rgba(36, 35, 33, .12);
  --line-strong: rgba(36, 35, 33, .24);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea { font: inherit; }
img, svg { max-width: 100%; }

.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  padding: 10px 14px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 22px; font-size: clamp(2.9rem, 6.2vw, 5.4rem); font-weight: 800; line-height: .96; letter-spacing: -.025em; }
h2 { margin-bottom: 18px; font-size: clamp(1.8rem, 3.4vw, 2.85rem); font-weight: 800; line-height: 1.06; letter-spacing: -.018em; }
h3 { margin-bottom: 10px; font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.lead { max-width: 66ch; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.18rem); }
.muted { color: var(--muted); }
.eyebrow, .kicker {
  margin: 0 0 16px;
  color: var(--soft);
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* ---------- lead bar ---------- */
.lead-bar {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.lead-bar-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 22px;
  width: min(calc(100% - 40px), var(--max));
  margin-inline: auto;
  padding-block: 13px;
}
.lead-bar-text { margin: 0; font-size: .95rem; font-weight: 700; }
.lead-bar-fields { display: flex; flex-wrap: wrap; gap: 10px; }
.lead-bar-fields input {
  min-width: 240px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
}
.lead-bar-fields input::placeholder { color: var(--faint); }
.lead-bar-fields button {
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.lead-bar-fields button:hover, .lead-bar-fields button:focus { background: var(--accent-2); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.nav-bar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 8px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font-size: 1.05rem; font-weight: 800; }
.brand-name span { color: var(--soft); font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; }
nav { display: flex; align-items: center; gap: 22px; color: var(--muted); font-size: .93rem; font-weight: 600; }
nav a { text-decoration: none; }
nav a:hover, nav a:focus { color: var(--text); }
nav .nav-cta { padding-left: 22px; border-left: 1px solid var(--line); color: var(--accent); font-weight: 700; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 18px; }
.actions.centered { justify-content: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.button:hover, .button:focus { border-color: var(--text); }
.button.primary { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.button.primary:hover, .button.primary:focus { background: var(--accent-2); border-color: var(--accent-2); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.text-link:hover, .text-link:focus { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(40px, 6vw, 76px);
  align-items: center;
  padding-block: clamp(58px, 8vw, 96px);
}
.hero h1 { max-width: 14ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.micro { color: var(--soft); font-size: .92rem; font-weight: 600; }

.hero-panel {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.hero-panel h4 {
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.stack-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.stack-list li {
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: .96rem;
}
.stack-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.stack-list b { color: var(--accent); font-family: var(--mono); font-size: .95rem; font-weight: 700; }
.stack-list span { color: var(--muted); }

/* ---------- metrics ---------- */
.metrics { border-bottom: 1px solid var(--line); background: var(--panel); }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-inline: 1px solid var(--line);
}
.metric-grid > div { padding: 30px 26px; background: var(--panel); }
.metric-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
}
.metric-grid span { color: var(--muted); font-size: .9rem; }

/* ---------- sections ---------- */
section { border-bottom: 1px solid var(--line); }
.pad { padding-block: clamp(64px, 8vw, 96px); }
.section-intro {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: end;
  margin-bottom: 44px;
}
.section-intro h2 { margin-bottom: 0; }
.section-intro .lead { margin-bottom: 0; }

/* services */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card {
  display: flex;
  flex-direction: column;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.service-card .num {
  margin-bottom: 20px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.service-card p { margin-bottom: 0; color: var(--muted); font-size: .97rem; }
.service-card .note {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: .92rem;
  font-weight: 600;
}

/* lenses */
.lens-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 12px; }
.lens {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.lens::before { content: ""; display: block; width: 34px; height: 3px; margin-bottom: 18px; background: var(--steel); }
.lens.feed::before { background: var(--accent); }
.lens p { margin-bottom: 0; color: var(--muted); font-size: .95rem; }
.lens .ask { margin-top: 14px; color: var(--text); font-weight: 700; }
.equation {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.equation b { color: var(--text); }
.equation .mark { color: var(--faint); font-family: var(--mono); font-weight: 700; }

/* work */
.work { display: grid; gap: 20px; }
.work-item {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.work-item .tag {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.work-item h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -.015em; }
.work-item .role { color: var(--soft); font-family: var(--mono); font-size: .82rem; }
.work-body p { color: var(--muted); }
.work-body p:last-of-type { margin-bottom: 0; }
.facts { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 9px; }
.facts li { position: relative; padding-left: 22px; color: var(--muted); font-size: .96rem; }
.facts li::before { content: "\2192"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.work-links { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }

/* open source table */
.repo-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.repo {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr) 9rem;
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.repo:hover, .repo:focus { background: var(--panel); }
.repo strong { font-size: 1.05rem; font-weight: 700; }
.repo p { margin: 0; color: var(--muted); font-size: .96rem; }
.repo .meta { color: var(--soft); font-family: var(--mono); font-size: .78rem; text-align: right; letter-spacing: .06em; }

/* method */
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.method-grid > li { list-style: none; padding: 28px 24px; background: var(--panel); }
.method-grid .step { display: block; margin-bottom: 16px; color: var(--faint); font-family: var(--mono); font-size: .78rem; font-weight: 700; letter-spacing: .1em; }
.method-grid p { margin-bottom: 0; color: var(--muted); font-size: .95rem; }
.method-list { margin: 0; padding: 0; list-style: none; }

.stance {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.quote {
  margin: 0 0 24px;
  padding: 22px 26px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  font-size: 1.16rem;
  font-weight: 700;
}
.stance-body p { color: var(--muted); }
.stance-body p:last-child { margin-bottom: 0; }

/* fit */
.fit-panel {
  padding: clamp(30px, 4vw, 52px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.fit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 30px;
  background: var(--line);
  border: 1px solid var(--line);
}
.fit-grid p { margin: 0; padding: 20px 22px; background: var(--panel); font-weight: 600; }

/* contact */
.contact { background: var(--panel); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .88fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.contact-card {
  padding: clamp(26px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
}
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: .88rem; font-weight: 700; }
.field input, .field textarea {
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--bg);
  color: var(--text);
}
.field textarea { min-height: 132px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.contact-card button {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.contact-card button:hover, .contact-card button:focus { background: var(--accent-2); }
.form-note { margin: 14px 0 0; color: var(--soft); font-size: .85rem; }
.direct { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.direct li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: .97rem;
}
.direct span { color: var(--soft); font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.direct a { color: var(--accent); font-weight: 700; text-decoration: none; }
.direct a:hover, .direct a:focus { text-decoration: underline; text-underline-offset: 3px; }

/* footer */
footer { padding-block: 34px 46px; color: var(--soft); font-size: .92rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { text-decoration: none; }
footer a:hover, footer a:focus { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .section-intro, .work-item, .stance, .contact-grid { grid-template-columns: 1fr; }
  .section-intro { align-items: start; }
  .metric-grid, .lens-grid, .method-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: 1fr; }
  .fit-grid { grid-template-columns: repeat(2, 1fr); }
  nav { display: none; }
  .repo { grid-template-columns: 1fr; gap: 6px; }
  .repo .meta { text-align: left; }
}
@media (max-width: 560px) {
  .metric-grid, .lens-grid, .method-grid, .fit-grid { grid-template-columns: 1fr; }
  .stack-list li { grid-template-columns: 1fr; gap: 2px; }
  .direct li { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- language selector ---------- */
.language {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 22px;
  border-left: 1px solid var(--line);
  color: var(--soft);
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}
.language a { text-decoration: none; }
.language a:hover, .language a:focus { color: var(--text); }
.language [aria-current="page"] { color: var(--accent); }
@media (max-width: 1000px) {
  .language { padding-left: 0; border-left: 0; }
}
.nav-wrap { display: flex; align-items: center; gap: 22px; }
