* {
  box-sizing: border-box;
}

:root {
  --ink: #1d2422;
  --muted: #5b6762;
  --paper: #f7faf7;
  --surface: #ffffff;
  --soft: #edf4f0;
  --line: #dce6e0;
  --teal: #0f766e;
  --teal-dark: #0b5f59;
  --clay: #aa5239;
  --violet: #575fa6;
  --shadow: 0 18px 45px rgba(29, 36, 34, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
}

.shell,
.article-shell {
  width: min(100% - 2rem, 1120px);
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 20;
  transform: translateY(-150%);
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(220, 230, 224, 0.9);
  background: rgba(247, 250, 247, 0.94);
  backdrop-filter: blur(16px);
}

.header-shell {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand,
.site-nav,
.actions,
.filter-row,
.post-meta,
.post-footer,
.tag-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: block;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-nav {
  gap: 0.15rem;
  overflow-x: auto;
}

.site-nav a,
.filter-row button {
  min-height: 2.35rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.site-nav a {
  padding: 0.45rem 0.7rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.filter-row button:hover,
.filter-row button:focus-visible,
.filter-row button[aria-pressed="true"] {
  background: var(--soft);
  color: var(--teal-dark);
}

.hero {
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: 3rem;
  align-items: center;
  padding: 5.5rem 0;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.article-hero h1 {
  margin: 0;
  line-height: 1.08;
}

.hero h1 {
  font-size: 4rem;
}

.hero h1 span {
  display: block;
  color: var(--teal);
}

.hero-summary,
.section-head p,
.contact-section p,
.article-summary,
.article-content p,
.article-content li,
.card p,
.timeline-item p {
  color: var(--muted);
}

.hero-summary {
  max-width: 62ch;
  margin: 1.1rem 0 0;
  font-size: 1.08rem;
}

.actions {
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.button.primary {
  background: var(--teal);
  color: #ffffff;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--teal-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
}

.profile-panel,
.contact-panel,
.card,
.timeline-item,
.skill-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.profile-panel {
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.fact-list {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.fact-list div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.fact-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.fact-list dt,
.subtle,
.post-meta,
.post-footer {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.fact-list dd {
  margin: 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.metric {
  min-height: 6rem;
  padding: 0.9rem;
  border-radius: 8px;
  background: var(--soft);
}

.metric strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

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

.surface {
  background: var(--surface);
}

.section-head {
  max-width: 720px;
  margin-bottom: 2rem;
}

.section-head.row {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}

.section h2 {
  font-size: 2.55rem;
}

.section-head p {
  max-width: 34rem;
  margin: 0.9rem 0 0;
  font-size: 1.02rem;
}

.focus-grid,
.project-grid,
.post-list,
.resume-grid {
  display: grid;
  gap: 1rem;
}

.focus-grid,
.project-grid,
.post-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resume-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  gap: 2rem;
}

.card,
.timeline-item,
.skill-group {
  padding: 1.15rem;
}

.card {
  min-height: 14rem;
}

.card-number {
  color: var(--clay);
  font-weight: 900;
}

.card h3,
.post-card h3,
.project-card h3 {
  margin: 0.7rem 0 0;
  line-height: 1.25;
}

.card p,
.timeline-item p {
  margin: 0.6rem 0 0;
}

.project-card,
.post-card {
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  justify-content: space-between;
}

.project-card a,
.post-card a,
.article-back {
  color: var(--teal-dark);
  font-weight: 900;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

.resume-grid h3,
.stack-heading {
  margin: 0 0 1rem;
  font-size: 1.18rem;
}

.stack-heading {
  margin-top: 1.6rem;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  border-left: 4px solid var(--teal);
}

.timeline.compact .timeline-item {
  border-left-color: var(--clay);
}

.timeline-item h4 {
  margin: 0.35rem 0 0;
  font-size: 1.06rem;
}

.strong {
  font-weight: 850;
}

.tag-row {
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.tag {
  display: inline-flex;
  min-height: 1.7rem;
  align-items: center;
  padding: 0.16rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  font-size: 0.78rem;
  font-weight: 850;
}

.skill-groups {
  display: grid;
  gap: 0.9rem;
}

.skill-group h4 {
  margin: 0;
}

.filter-row {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.filter-row button {
  padding: 0.35rem 0.72rem;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font: inherit;
}

.post-meta,
.post-footer {
  justify-content: space-between;
  gap: 0.8rem;
}

.contact-section {
  background: #20231f;
  color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: 3rem;
  align-items: start;
}

.contact-section .eyebrow {
  color: #7bd6cd;
}

.contact-section h2 {
  max-width: 14ch;
}

.contact-section p,
.contact-section .fact-list dt,
.contact-section .copy-status {
  color: rgba(255, 255, 255, 0.72);
}

.contact-panel {
  padding: 1.25rem;
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

.contact-panel .fact-list div {
  border-color: rgba(255, 255, 255, 0.16);
}

.copy-status {
  min-height: 1.5rem;
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
}

.site-footer {
  padding: 1.1rem;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.76);
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.article-page {
  background: var(--surface);
}

.article-shell {
  max-width: 860px;
}

.article-hero {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.article-back {
  display: inline-flex;
  margin-bottom: 1.5rem;
}

.article-hero h1 {
  max-width: 13ch;
  font-size: 3.1rem;
}

.article-summary {
  max-width: 66ch;
  margin: 1.2rem 0 0;
  font-size: 1.08rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.article-meta span {
  min-height: 1.85rem;
  padding: 0.16rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 850;
}

.article-content {
  padding: 3rem 0 4rem;
}

.article-content h2 {
  margin: 2.2rem 0 0.8rem;
  font-size: 1.48rem;
  line-height: 1.25;
}

.article-content p,
.article-content li {
  font-size: 1.02rem;
}

.article-content ul,
.article-content ol {
  padding-left: 1.25rem;
}

.article-content code {
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  font-family:
    ui-monospace,
    SFMono-Regular,
    Consolas,
    "Liberation Mono",
    monospace;
  font-size: 0.94em;
}

.article-content :not(pre) > code {
  padding: 0.12rem 0.32rem;
}

.article-content pre,
.article-callout {
  border-radius: 8px;
}

.article-content pre {
  overflow-x: auto;
  margin: 1.1rem 0;
  padding: 1rem;
  background: #20231f;
}

.article-content pre code {
  background: transparent;
  color: #f8faf8;
}

.article-callout {
  margin: 1.4rem 0;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--teal);
  background: var(--paper);
}

@media (max-width: 900px) {
  .header-shell,
  .hero-grid,
  .section-head.row {
    align-items: flex-start;
  }

  .header-shell,
  .section-head.row {
    flex-direction: column;
  }

  .hero-grid,
  .resume-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .focus-grid,
  .project-grid,
  .post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell,
  .article-shell {
    width: min(100% - 1rem, 1120px);
  }

  .header-shell {
    gap: 0.7rem;
    padding: 0.8rem 0;
  }

  .site-nav {
    width: 100%;
  }

  .hero-grid {
    padding: 3.3rem 0;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .section {
    padding: 3.2rem 0;
  }

  .section h2,
  .article-hero h1 {
    font-size: 2.1rem;
  }

  .focus-grid,
  .project-grid,
  .post-list,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .actions,
  .actions .button,
  .contact-panel .button {
    width: 100%;
  }

  .fact-list div,
  .post-meta,
  .post-footer {
    grid-template-columns: 1fr;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .article-hero {
    padding: 3rem 0 2.4rem;
  }
}
