:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --header-bg: #f0f2f1;
  --ink: #1c1b19;
  --muted: #5c5a55;
  --line: #e6e6e6;
  --accent: #2f6f4e;
  --accent-soft: #f3f7f4;
  --max: 42rem;
  --pad: 1.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

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

a:hover {
  color: var(--ink);
}

.wrap {
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.profile-photo {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
}

.hero .lede {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header .wrap {
  padding: 0.9rem 0;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-logo:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 1rem;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
}

.nav-toggle-bars::before {
  transform: translateY(-5px);
}

.nav-toggle-bars::after {
  transform: translateY(3px);
}

.nav-open .nav-toggle-bars {
  background: transparent;
}

.nav-open .nav-toggle-bars::before {
  transform: translateY(0) rotate(45deg);
}

.nav-open .nav-toggle-bars::after {
  transform: translateY(-2px) rotate(-45deg);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  font-size: 0.9rem;
  margin-top: 0.85rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-main {
  padding: 2.75rem 0 4rem;
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.85rem, 4vw, 2.4rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede,
.section p,
.article p,
.article li {
  color: var(--muted);
}

.lede p,
.section p {
  margin: 0 0 1rem;
}

.section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-intro {
  margin-bottom: 1.25rem;
}

.project,
.post,
.interest-block {
  margin-bottom: 1.5rem;
}

.project:last-child,
.post:last-child,
.interest-block:last-child {
  margin-bottom: 0;
}

.project h3,
.post h3,
.interest-block h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.project h3 a,
.post h3 a {
  color: var(--ink);
  text-decoration: none;
}

.project h3 a:hover,
.post h3 a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.meta {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.chip-list li {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 0.82rem;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
}

.contact-card a {
  font-weight: 600;
}

.contact-note {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
}

.site-footer .copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Article / blog */
.article {
  padding-top: 0.5rem;
}

.article h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.25;
  font-weight: 600;
}

.article h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.article ul,
.article ol {
  color: var(--muted);
  padding-left: 1.25rem;
}

.article li {
  margin-bottom: 0.45rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

@media (min-width: 641px) {
  .site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .header-bar {
    flex: 0 0 auto;
  }

  .site-nav {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: sticky;
    top: 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
  }

  .nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .site-main {
    padding-top: 2rem;
  }
}
