* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
::selection { background: rgba(120, 120, 120, 0.16); }

html {
  color-scheme: dark;
  --bg: #191919;
  --text: #d6d6d4;
  --sec: #8f8f8b;
  --hover: #262625;
  --border: #2c2c2b;
  --accent: #b0745b;
  background: var(--bg);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #fdfdfc;
  --text: #37352f;
  --sec: #8b8a85;
  --hover: #f0f0ee;
  --border: #e6e5e2;
}

.page {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
  display: flex;
  justify-content: center;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--hover);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--accent, #b0745b) 45%, var(--border, #e6e5e2));
  color: var(--accent, #b0745b);
}

.container {
  width: 100%;
  max-width: 592px;
  padding: 88px 32px 96px;
}

.masthead {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 26px;
}

.masthead-text {
  min-width: 0;
  flex: 1;
}

.masthead-text h1 {
  margin: 0;
}

.masthead-roles {
  list-style: none;
  margin: 7px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.masthead-roles li {
  color: var(--sec, #8b8a85);
  font-size: 14px;
  line-height: 1.45;
}

.profile-pic {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  margin-top: 3px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}

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

.profile-pic-img--light {
  display: none;
}

html[data-theme="light"] .profile-pic-img--light {
  display: block;
}

html[data-theme="light"] .profile-pic-img--dark {
  display: none;
}

h1 {
  font-family: var(--heading-font, Georgia, serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 5px;
}

h2 {
  font-family: var(--heading-font, Georgia, serif);
  font-size: 15px;
  font-weight: 600;
  margin: 36px 0 6px;
  letter-spacing: 0;
}

.accent-link {
  color: var(--accent, #b0745b);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent, #b0745b) 40%, transparent);
  transition: border-color 0.15s ease;
}

.accent-link:hover {
  border-color: var(--accent, #b0745b);
}

.work-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.work-item {
  text-decoration: none;
  color: var(--text, #37352f);
  display: block;
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.work-item:hover {
  background: var(--hover, #f0f0ee);
  color: var(--accent, #b0745b);
}

.work-item-title {
  display: block;
}

.work-item-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.work-item-date {
  color: var(--sec, #8b8a85);
  flex-shrink: 0;
}

.work-item-meta {
  display: block;
  margin-top: 2px;
  color: var(--sec, #8b8a85);
  font-size: 14px;
}

.community-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.community-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: var(--text, #37352f);
  padding: 5px 12px;
  margin: 0 -12px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.community-item:hover {
  background: var(--hover, #f0f0ee);
  color: var(--accent, #b0745b);
}

.community-item-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.community-item-logo--wide {
  width: auto;
  height: 18px;
  max-width: 72px;
}

.community-item-logos {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.community-item-logo--light {
  display: none;
}

html[data-theme="light"] .community-item-logo--light {
  display: block;
}

html[data-theme="light"] .community-item-logo--dark {
  display: none;
}

.community-item:hover .community-item-logo {
  opacity: 1;
}

.community-item-date {
  color: var(--sec, #8b8a85);
  flex-shrink: 0;
}

.mono {
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
}

.footer {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--border, #e6e5e2);
  display: flex;
  justify-content: flex-end;
}

.footer-split {
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-link {
  color: var(--sec, #8b8a85);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--accent, #b0745b);
}

.detail-title {
  margin: 0 0 6px;
}

.detail-meta {
  margin: 0 0 32px;
  color: var(--sec, #8b8a85);
  font-size: 15px;
}

.body-copy {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.body-copy p {
  margin: 0;
}

.body-copy .lede {
  font-size: 16px;
}
