:root {
  --background: #faf9f6;
  --text: #202124;
  --muted: #5f6368;
  --accent: #315f7d;
  --accent-dark: #24475f;
  --line: #d9d7d1;
  --code-background: #f0efeb;
  --max-width: 960px;
  --reading-width: 72ch;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  background: var(--background);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
}

::selection {
  color: var(--text);
  background: #dce8ef;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-dark);
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
}

code,
pre {
  font-family: var(--font-mono);
}

code {
  font-size: 0.9em;
}

.shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  color: var(--background);
  background: var(--text);
}

.skip-link:focus {
  top: 0.75rem;
}

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

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
}

.brand {
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.nav-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.nav-link.is-active {
  color: var(--text);
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.site-main {
  padding-bottom: 4rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.125rem);
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.12rem;
}

.page-header {
  padding-block: 2.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.page-description {
  max-width: var(--reading-width);
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.page-content {
  padding-top: 2rem;
}

.about-page {
  max-width: var(--max-width);
  padding-top: 2.75rem;
}

.about-header {
  max-width: var(--reading-width);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.about-role {
  margin: 0 0 0.35rem;
  color: var(--muted);
}

.about-intro {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.05rem;
}

.location {
  color: var(--muted);
}

.about-section {
  max-width: var(--reading-width);
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.about-section h2 {
  margin: 0 0 0.75rem;
}

.contact-list,
.technology-list {
  list-style: none;
  padding: 0;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  margin: 0;
}

.contact-list li,
.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.professional-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
}

.technology-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
}

.technology-list li {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
}

.technology-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 2rem;
}

.project-entry {
  min-width: 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.project-media,
.project-detail-media,
.post-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 1px solid var(--line);
}

.project-media img,
.project-detail-media img,
.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-entry h2 {
  margin: 1rem 0 0.5rem;
}

.project-entry p {
  margin: 0.5rem 0;
}

.project-technologies,
.project-status,
.detail-meta,
.article-meta,
.post-entry time {
  color: var(--muted);
  font-size: 0.94rem;
}

.entry-links {
  margin-top: 0.75rem;
}

.media-placeholder {
  background: var(--code-background);
}

.post-list {
  max-width: var(--reading-width);
}

.post-entry {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 0 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.post-summary h2 {
  margin: 0.2rem 0 0.5rem;
}

.post-summary p {
  margin: 0 0 0.6rem;
}

.article-layout {
  max-width: var(--reading-width);
  padding-top: 2.5rem;
}

.article-header {
  margin-block: 1.5rem 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin-bottom: 0.6rem;
}

.article-header p {
  margin: 0.6rem 0 0;
}

.project-detail-media {
  margin: 0 0 2rem;
}

.rich-text {
  max-width: var(--reading-width);
}

.rich-text > * {
  margin-block: 0 1.25rem;
}

.rich-text h2,
.rich-text h3 {
  margin-top: 2rem;
}

.rich-text ul,
.rich-text ol {
  padding-left: 1.4rem;
}

.rich-text pre {
  max-width: 100%;
  padding: 1rem;
  overflow-x: auto;
  border-left: 3px solid var(--accent);
  background: var(--code-background);
  font-size: 0.9rem;
  line-height: 1.5;
}

.rich-text blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  padding-block: 1.25rem;
  margin-block: 0;
}

@media (max-width: 700px) {
  body {
    font-size: 16px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .site-nav {
    gap: 0.9rem;
  }

  .page-header,
  .about-page,
  .article-layout {
    padding-top: 2rem;
  }

  .project-list {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .post-entry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-list {
    align-items: flex-start;
    flex-direction: column;
  }
}
