/* Shared styles for the personal site and technical articles. */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #1d2738;
  --muted: #5b677a;
  --accent: #245cca;
  --line: #dce3eb;
  --soft: #eef2f7;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: var(--font-sans);
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
::selection { background: #dbe7ff; color: var(--ink); }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
button, input { font: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.container { width: 100%; max-width: 1104px; padding-inline: 32px; margin-inline: auto; }
.eyebrow { font: 400 12px/1.6 var(--font-mono); color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 20px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--surface); transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); color: var(--surface); }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 4px; color: var(--accent); font: 500 14px var(--font-mono); background: var(--surface); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { min-height: 44px; display: inline-flex; align-items: center; font-size: 12px; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--accent); text-decoration: underline; }
.text-link { display: inline-flex; gap: 8px; align-items: center; color: var(--accent); font-size: 13px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.chip { display: inline-block; font: 400 11px/1.5 var(--font-mono); padding: 4px 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: var(--surface); text-decoration: none; }
a.chip:hover { color: var(--accent); border-color: var(--accent); }
.profile { display: grid; grid-template-columns: minmax(0, 1fr) 225px; gap: 70px; padding-block: 64px 56px; }
.profile .eyebrow { margin-bottom: 13px; color: var(--accent); }
.profile h1 { font-size: clamp(32px, 4.4vw, 48px); font-weight: 600; line-height: 1.15; letter-spacing: -.045em; margin-bottom: 24px; }
.profile h1 > span { color: var(--accent); }
.profile-description { max-width: 620px; font-size: 15px; color: var(--muted); margin-bottom: 15px; line-height: 1.85; }
.profile-links { display: flex; align-items: center; gap: 24px; margin-top: 23px; }
.profile-links a { padding-block: 5px; color: var(--accent); font-size: 13px; text-decoration: none; }
.profile-links a:hover { text-decoration: underline; }
.profile-links span { margin-left: 5px; }
.profile-details { align-self: center; padding-left: 25px; margin: 0; border-left: 1px solid var(--line); }
.profile-details > div + div { margin-top: 20px; }
.profile-details dt { font: 11px/1.7 var(--font-mono); color: var(--muted); margin-bottom: 4px; }
.profile-details dd { margin: 0; font-size: 13px; }
.profile-details dd > span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.home-section { border-top: 1px solid var(--line); padding-block: 32px 44px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.section-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; margin: 0; }
.section-note { font: 11px/1.6 var(--font-mono); color: var(--muted); }
.project-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding-block: 24px; }
.project-row + .project-row { border-top: 1px solid var(--line); }
.project-row:last-child { padding-bottom: 0; }
.project-context { padding-top: 2px; display: flex; flex-direction: column; gap: 6px; font: 11px/1.7 var(--font-mono); color: var(--muted); }
.project-context > span:first-child { color: var(--ink); }
.project-body h3 { font-size: 17px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 9px; }
.project-body p { margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.project-body strong { font-weight: 500; color: var(--ink); }
.experience-list { list-style: none; padding: 0; margin: 0; }
.experience-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding-block: 23px; }
.experience-row + .experience-row { margin-top: 8px; border-top: 1px solid var(--line); }
.experience-row:last-child { padding-bottom: 0; }
.experience-date { font: 11px/1.8 var(--font-mono); color: var(--muted); padding-top: 3px; }
.job-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.job-heading h3 { font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.job-location { color: var(--muted); font: 11px/1.8 var(--font-mono); }
.job-role { font-size: 14px; margin-bottom: 3px; }
.job-team { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.job-details { margin: 0; padding-left: 17px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.job-details li + li { margin-top: 10px; }
.writing-entry { display: grid; grid-template-columns: 180px minmax(0, 1fr) 18px; gap: 32px; padding-block: 23px; text-decoration: none; align-items: baseline; }
.writing-entry + .writing-entry { border-top: 1px solid var(--line); }
.writing-entry:last-child { padding-bottom: 0; }
.writing-date { font: 11px/1.8 var(--font-mono); color: var(--muted); }
.writing-entry h3 { font-size: 16px; font-weight: 500; margin-bottom: 7px; line-height: 1.6; letter-spacing: -.015em; }
.writing-entry p { font-size: 13px; color: var(--muted); margin: 0; }
.entry-arrow { font-size: 16px; color: var(--muted); }
.writing-entry:hover h3, .writing-entry:hover .entry-arrow { color: var(--accent); }
.contact-section { padding-bottom: 48px; }
.contact-details { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.contact-details a { color: var(--accent); font-size: 14px; overflow-wrap: anywhere; }
.site-footer { border-top: 1px solid var(--line); padding-block: 20px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner p { font: 11px/1.7 var(--font-mono); color: var(--muted); margin: 0; }
.footer-links { display: flex; gap: 24px; font-size: 11px; }
.footer-links a { text-decoration: none; padding-block: 8px; }
.footer-links a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (max-width: 800px) {
  .brand-name { display: none; }
  .profile { gap: 35px; grid-template-columns: minmax(0, 1fr) 190px; }
  .project-row, .experience-row { grid-template-columns: 150px minmax(0, 1fr); gap: 25px; }
  .writing-entry { grid-template-columns: 150px minmax(0, 1fr) 16px; gap: 25px; }
}
@media (max-width: 640px) {
  .container { padding-inline: 20px; }
  .header-inner { min-height: 64px; gap: 18px; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: 11px; }
  .profile { grid-template-columns: 1fr; gap: 30px; padding-block: 40px 35px; }
  .profile h1 { font-size: 34px; margin-bottom: 19px; }
  .profile-description { font-size: 14px; }
  .profile-details { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .profile-details > div + div { margin-top: 0; }
  .home-section { padding-block: 26px 32px; }
  .section-heading { margin-bottom: 15px; }
  .section-heading h2 { font-size: 19px; }
  .section-note { display: none; }
  .project-row, .experience-row { grid-template-columns: 1fr; gap: 10px; padding-block: 22px; }
  .project-context { flex-direction: row; gap: 12px; }
  .project-body h3 { font-size: 16px; }
  .project-body p, .job-details { font-size: 14px; }
  .writing-entry { grid-template-columns: minmax(0, 1fr) 16px; gap: 8px 16px; padding-block: 22px; }
  .writing-date { grid-column: 1 / -1; }
  .writing-entry h3 { font-size: 15px; }
  .contact-details { gap: 15px 25px; }
  .footer-inner { align-items: start; }
}
@media (max-width: 360px) {
  .site-nav { gap: 12px; }
  .site-nav a { font-size: 10px; }
  .brand-mark { width: 28px; height: 28px; font-size: 12px; }
  .profile h1 { font-size: 30px; }
  .profile-details dd { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  body { background: white; color: black; }
  .site-header { position: static; }
  .site-nav, .skip-link, .footer-links { display: none; }
  .brand-name { display: inline; }
  .container { max-width: none; padding-inline: 0; }
  .profile { padding-block: 24px; }
  .profile h1 { font-size: 30px; }
  .home-section { padding-block: 20px; }
  .project-row, .experience-row, .writing-entry { break-inside: avoid; }
}
