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

:root {
  --text: #111;
  --muted: #444;
  --faint: #737373;
  --accent: #1a56db;
  --border: #e5e5e5;
  --font: system-ui, -apple-system, sans-serif;
  --width: 760px;
  --pad: 1.25rem;
}

html { scroll-behavior: smooth; font-size: 118.75%; }

body {
  font-family: var(--font);
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: #fff;
  text-align: left;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- LAYOUT ---- */

.container {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---- NAV ---- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.93);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0.55rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.nav-logo { font-weight: 700; color: var(--text); font-size: 0.9rem; }
.nav-logo:hover { text-decoration: none; }

.nav-links { display: flex; list-style: none; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-size: 0.85rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  padding: 0;
}

/* ---- HERO ---- */

.hero {
  padding: 4.25rem 0 1.75rem;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  text-align: left;
}

.hero-eyebrow { font-size: 0.78rem; color: var(--muted); display: block; margin-bottom: 0.2rem; }

.hero-name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.hero-tagline {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 0.85rem;
}

.hero-actions { display: flex; gap: 1.25rem; font-size: 0.85rem; }
.hero-actions a { color: var(--muted); }
.hero-actions a:first-child { color: var(--accent); font-weight: 600; }
.hero-actions a:hover { text-decoration: underline; }

.hero-aside {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.headshot-wrap { width: 72px; height: 72px; }

.headshot {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border: 1px solid var(--border);
}

.headshot-placeholder {
  display: none;
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1px dashed var(--faint);
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 0.7rem;
  text-align: center;
  padding: 0.5rem;
}

/* ---- SECTIONS ---- */

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

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-bottom: 1rem;
  text-align: left;
}

/* ---- RESUME ---- */

.group-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

.entries { display: flex; flex-direction: column; gap: 1rem; }

.entry { display: grid; grid-template-columns: 140px 1fr; gap: 0 1rem; }

.entry-date { font-size: 0.75rem; color: var(--faint); padding-top: 0.15rem; line-height: 1.4; text-align: left; }

.entry-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.05rem; }

.entry-org { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; }

.entry ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.entry ul li {
  font-size: 0.84rem;
  color: var(--muted);
  padding-left: 0.8rem;
  position: relative;
  line-height: 1.5;
}

.entry ul li::before { content: '–'; position: absolute; left: 0; color: var(--faint); }

.tags { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-top: 0.35rem; text-align: left; }

.tag {
  font-size: 0.68rem;
  color: var(--faint);
  border: 1px solid var(--border);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}

.resume-footer { margin-top: 1.25rem; font-size: 0.85rem; text-align: left; }

.section-footer { font-size: 0.84rem; color: var(--muted); text-align: left; }

/* ---- WRITING ---- */

.posts { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }

.post { display: grid; grid-template-columns: 76px 1fr; gap: 0 1rem; }

.post-date { font-size: 0.75rem; color: var(--faint); padding-top: 0.15rem; text-align: left; }

.post h3 { font-size: 0.86rem; font-weight: 600; margin-bottom: 0.1rem; line-height: 1.4; }
.post h3 a { color: var(--text); }
.post h3 a:hover { color: var(--accent); text-decoration: none; }
.post p { font-size: 0.81rem; color: var(--muted); }

/* ---- CONTACT ---- */

.contact-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.25rem; font-size: 0.85rem; text-align: left; }
.contact-links a { color: var(--muted); }
.contact-links a:hover { color: var(--accent); text-decoration: none; }

/* ---- ARTICLE ---- */

.page { padding-top: 3rem; }

.back-link { display: inline-block; font-size: 0.8rem; color: var(--muted); margin-bottom: 1rem; }
.back-link:hover { color: var(--accent); text-decoration: none; }

.page-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.4rem; text-align: left; }
.page-sub { color: var(--muted); font-size: 0.88rem; text-align: left; }

.article-meta { font-size: 0.78rem; color: var(--faint); text-align: left; }

.article-body { padding-bottom: 1rem; }
.article-body p, .article-body li { color: #333; font-size: 0.92rem; line-height: 1.7; }
.article-body p { margin-bottom: 1rem; }
.article-body h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; margin: 2rem 0 0.6rem; text-align: left; }
.article-body h3 { font-size: 0.92rem; font-weight: 600; margin: 1.4rem 0 0.4rem; text-align: left; }
.article-body ol, .article-body ul { margin: 0 0 1rem 1.25rem; display: flex; flex-direction: column; gap: 0.3rem; }
.article-body strong { font-weight: 600; color: var(--text); }

.article-body pre {
  background: #f6f6f4;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.8rem 0.9rem;
  margin: 0 0 1.1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: left;
  hyphens: none;
}

.code-block { position: relative; margin: 0 0 1.1rem; }
.code-block pre { margin: 0; padding-right: 4.5rem; }

.copy-btn {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  font: 600 0.68rem var(--font);
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}
.copy-btn:hover { color: var(--accent); border-color: #bfdbfe; }
.copy-btn.copied { color: #16a34a; border-color: #bbf7d0; }

.prompt-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 1.1rem 0 0.35rem; text-align: left; }
.prompt-label.weak { color: #b45309; }
.prompt-label.strong { color: #16a34a; }

.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 0.82rem; text-align: left; hyphens: none; }
.article-body th { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); padding: 0 0.6rem 0.4rem 0; border-bottom: 1px solid var(--border); }
.article-body td { padding: 0.5rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--border); vertical-align: top; color: #333; line-height: 1.45; }
.article-body td:nth-child(2) { white-space: nowrap; }

.bucket { font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 3px; border: 1px solid; }
.bucket.handoff { color: #16a34a; border-color: #bbf7d0; background: #f0fdf4; }
.bucket.assist { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.bucket.keep { color: var(--accent); border-color: #bfdbfe; background: #eff6ff; }

/* ---- FOOTER ---- */

.site-footer { padding: 1rem 0; }
.footer-inner {
  max-width: var(--width);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--faint);
  text-align: left;
}

/* ---- MOBILE ---- */

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

  .hero { padding: 4rem 0 2rem; }
  .hero-inner { flex-direction: column-reverse; gap: 0.75rem; }
  .hero-aside { flex-direction: row; align-items: center; }

  .entry, .post { grid-template-columns: 1fr; gap: 0.1rem; }
  .entry-date, .post-date { color: var(--faint); font-size: 0.73rem; }

  .footer-inner { flex-direction: column; gap: 0.25rem; }
}
