:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --panel: #fff;
  --text: #17202a;
  --muted: #586473;
  --line: #d7dde4;
  --accent: #111827;
  --font-sans: "DM Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(#cbd2da .7px, transparent .7px);
  background-size: 18px 18px;
  font-family: var(--font-sans);
}
a { color: inherit; font-weight: 600; }
code, pre, input, textarea, button { font: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 34px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.brand-mark { width: 9px; height: 9px; border-radius: 50%; background: #6aa9ff; box-shadow: 0 0 0 4px rgba(106,169,255,.16); }
.topnav, .footer-links { display: flex; flex-wrap: wrap; gap: 20px; color: var(--muted); font-size: .82rem; }
.topnav a, .footer-links a { text-decoration: none; }
.topnav a:hover, .topnav a:focus-visible, .footer-links a:hover, .footer-links a:focus-visible, a:hover { color: var(--text); }
.topnav a[aria-current="page"] { color: var(--text); }
.layout { display: grid; gap: 64px; padding: 56px 0; }
.page, .section-stack { display: grid; gap: 24px; }
.section-heading { display: grid; gap: 8px; max-width: 700px; }
.section-heading h1, .section-heading h2, .hero-copy h1, .info-card h3, .article-shell h1, .article-shell h2 { margin: 0; letter-spacing: -.035em; }
.section-heading h1, .hero-copy h1 { max-width: 15ch; font-size: clamp(2.35rem, 5vw, 4.6rem); line-height: .98; font-weight: 900; }
.section-heading h2 { font-size: 2rem; line-height: 1.1; }
.section-copy, .lead, .info-card p, .article-body { color: var(--muted); line-height: 1.6; }
.section-copy, .lead { margin: 0; max-width: 58ch; font-size: .94rem; }
.eyebrow { margin: 0; color: #64748b; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .14em; font-size: .65rem; font-weight: 700; }
.hero { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.info-card, .article-shell { padding: 24px; }
.info-card { position: relative; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease; }
.info-card:hover { border-color: #b7c2cf; background: #fff; transform: translateY(-2px); }
.info-card h2 { margin: 2px 0 0; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.025em; }
.info-card h2 a { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.info-card > p:not(.eyebrow):not(.tag-list):not(.card-links) { color: var(--muted); line-height: 1.6; }
.hero-copy { display: grid; align-content: center; gap: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.button, .hero-actions a, .card-links a, .back-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-size: .82rem; }
.hero-actions a:first-child { color: #fff; border-color: var(--accent); background: var(--accent); }
.profile-card { display: flex; flex-direction: column; width: 100%; justify-self: end; overflow: hidden; padding: 0; }
.profile-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.profile-card div { padding: 14px 16px; border-top: 1px solid var(--line); background: rgba(255,255,255,.5); }
.profile-card p:last-child { margin: 8px 0 0; line-height: 1.45; }
.stats-grid, .cards-grid, .panel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stats-grid ul { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 0; list-style: none; }
.stats-grid li { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--muted); font-size: .8rem; }
.stats-grid strong { display: block; color: var(--text); font-family: var(--font-mono); font-size: 1.3rem; }
.info-card { display: flex; flex-direction: column; gap: 10px; }
.info-card h3 { font-size: 1.18rem; }
.info-card p { margin: 0; font-size: .84rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto !important; padding-top: 8px; }
.tag-list span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-family: var(--font-mono); font-size: .64rem; }
.card-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto !important; padding-top: 12px; }
.card-action { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); font-size: .72rem; font-weight: 700; text-decoration: none; transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease; }
.card-action:hover, .card-action:focus-visible { border-color: var(--line-strong); background: #f8fafb; transform: translateY(-1px); outline: none; }
.card-action svg { width: 15px; height: 15px; flex: 0 0 auto; }
.experience-grid, .blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.article-shell { max-width: 820px; margin: 0 auto; }
.article-header { display: grid; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.article-header h1 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; }
.article-header p:last-child { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: .75rem; }
.article-body { padding-top: 10px; }
.article-body h2, .article-body h3 { color: var(--text); margin-top: 2em; }
.article-body a { color: var(--text); }
.article-body pre { overflow-x: auto; padding: 16px; border-radius: 10px; background: #eef1f4; color: var(--text); font-size: .82rem; }
.article-body img { max-width: 100%; height: auto; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.footer-copy { margin: 0; }

@media (max-width: 900px) {
  .hero, .cards-grid, .panel-grid, .experience-grid, .blog-grid { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1fr; }
  .profile-card { width: min(100%, 340px); justify-self: center; }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 1180px); padding-top: 12px; }
  .topbar { align-items: start; flex-direction: column; gap: 14px; }
  .topnav { gap: 12px; }
  .layout { gap: 44px; padding: 40px 0; }
  .info-card, .article-shell { padding: 16px; }
  .cards-grid, .panel-grid, .experience-grid, .blog-grid, .stats-grid ul { grid-template-columns: 1fr; }
  .section-heading h1, .hero-copy h1 { max-width: none; font-size: clamp(2.25rem, 12vw, 3.5rem); }
  .footer { align-items: start; flex-direction: column; }
}
