/* style.css, hand-written, no framework, no build step, no CDN.
   System font stack so there are zero font files to host or rot.
   Light/dark by preference. Designed to still look fine in 2050. */

:root {
  --container: 55rem; /* outer container, used on every page (header/footer/main) */
  --reading: 44rem; /* prose column width inside posts */
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #666666;
  --border: #e5e5e5;
  --code-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --fg: #d4d5d8;
    --muted: #9aa0a6;
    --border: #2a2d33;
    --code-bg: #22252b;
  }
}

* {
  box-sizing: border-box;
}

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

/* Visible keyboard focus ring for accessibility. */
:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before {
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
}

main,
.site-header,
.site-footer {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Posts keep a comfortable reading column inside the wide container. */
.post article {
  max-width: var(--reading);
}

/* Header */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  padding-bottom: 1.25rem;
  flex-wrap: wrap;
}
.site-title {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--fg);
}
.site-header nav a {
  margin-left: 1rem;
  color: var(--muted);
  text-decoration: none;
}
.site-header nav a:hover {
  color: var(--fg);
}

/* Links */
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition:
    color 0.15s ease,
    text-decoration-color 0.15s ease;
}
a:hover {
  text-decoration-color: var(--muted);
}

/* Article */
main {
  flex: 1 0 auto; /* push the footer to the bottom on short pages */
  padding-bottom: 4rem;
}
article h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.25rem;
}
.meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0;
}
.tag {
  display: inline-block;
}

article h2 {
  margin-top: 2.25rem;
  font-size: 1.45rem;
}
article h3 {
  margin-top: 1.75rem;
  font-size: 1.2rem;
  margin-bottom: 0.15rem;
}
article h4 {
  margin-top: 1.4rem;
  margin-bottom: 0.2rem;
  font-size: 1.02rem;
}
/* date / tech-stack lines that sit right under a heading (about page) */
article h3 + p em:only-child {
  color: var(--muted);
  font-size: 0.9rem;
}
article img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
article blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

/* Code */
code {
  font-family:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.15em 0.35em;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.5;
}
pre code {
  background: none;
  padding: 0;
}

/* Post lists (index + archive) */
.intro {
  color: var(--muted);
  margin: 2.5rem 0 3rem;
}
.intro p {
  margin: 0;
}
.byline {
  font-size: 0.9rem;
}
/* Classic bulleted list of post titles */
.post-list {
  margin: 0;
  padding-left: 1.2rem;
}
.post-list li {
  margin: 0.4rem 0;
}
.post-list a {
  font-weight: 500;
}

.more {
  margin-top: 1.5rem;
}
.more a {
  font-weight: 500;
  text-decoration: none;
}
.more a:hover {
  text-decoration: underline;
}

/* Profile / About, two-column, sticky identity card on the left */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 56rem) {
  .profile-grid {
    grid-template-columns: 15rem 1fr;
    gap: 3rem;
    align-items: start;
  }
  .profile-aside {
    position: sticky;
    top: 2rem;
  }
}
.profile-name {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.25rem;
}
.profile-role {
  font-weight: 500;
  margin: 0 0 0.75rem;
}
.profile-tagline {
  color: var(--muted);
  margin: 0 0 1.25rem;
  max-width: 22rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}
.chip {
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}
.profile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.profile-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-nav a::before {
  content: "";
  width: 1.25rem;
  height: 1px;
  background: var(--border);
  transition:
    width 0.15s ease,
    background 0.15s ease;
}
.profile-nav a:hover {
  color: var(--fg);
}
.profile-nav a:hover::before {
  width: 2rem;
  background: var(--fg);
}
.profile-social {
  display: flex;
  gap: 1.25rem;
}
.profile-social a {
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--muted);
}
.profile-social a:hover {
  color: var(--fg);
}

/* Right column content, airy, no divider lines */
.profile-main > :first-child {
  margin-top: 0;
}
.profile-main p {
  margin: 0 0 1rem;
}
/* Section labels, uppercase, muted, no underline */
.profile-main h2 {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin: 3.5rem 0 1.5rem;
}
.profile-main section {
  scroll-margin-top: 1.5rem;
}

/* Roles & education, timeline: date in a left column, content on the right */
.role {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  margin-top: 2.25rem;
}
.role .when {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.role h3 {
  margin: 0;
  font-size: 1.05rem;
}
.role .company {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.role ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}
.role li {
  margin: 0.3rem 0;
}
@media (max-width: 40rem) {
  .role {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

/* Selected systems */
.system {
  margin-top: 2rem;
}
.system h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}
.system .tech {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Small bold subhead (e.g. Typical ownership) */
.subhead {
  font-weight: 600;
  margin: 2rem 0 0.4rem;
}
.profile-main ul {
  padding-left: 1.1rem;
}
.profile-main li {
  margin: 0.25rem 0;
}

/* Facts grid (At a glance, Technical stack), borderless, stacked label/value */
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2.5rem;
  margin: 1.5rem 0 0;
}
.facts > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.facts dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.facts dd {
  margin: 0;
}

/* FAQ */
.faq dt {
  font-weight: 600;
  margin-top: 1.5rem;
}
.faq dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--fg);
}
