:root {
  --bg: #ffffff;
  --text: #404040;       /* neutral-700 */
  --text-dim: #737373;   /* neutral-500 */
  --text-dimmer: #a3a3a3;/* neutral-400 */
  --border: #f5f5f5;     /* neutral-100 */
  --chip-bg: #f5f5f5;    /* neutral-100 */
  --hover-bg: #fafafa;   /* neutral-50 */
  --icon-bg: #f5f5f5;    /* neutral-100 */
  --icon-fg: #a3a3a3;    /* neutral-400 */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a;         /* neutral-950 */
    --text: #d4d4d4;       /* neutral-300 */
    --text-dim: #737373;   /* neutral-500 */
    --text-dimmer: #737373;
    --border: #171717;     /* neutral-900 */
    --chip-bg: #262626;    /* neutral-800 */
    --hover-bg: #171717;   /* neutral-900 */
    --icon-bg: #262626;    /* neutral-800 */
    --icon-fg: #a3a3a3;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --text: #d4d4d4;
  --text-dim: #737373;
  --text-dimmer: #737373;
  --border: #171717;
  --chip-bg: #262626;
  --hover-bg: #171717;
  --icon-bg: #262626;
  --icon-fg: #a3a3a3;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 460px;
  margin: 24px auto;
  padding: 0 24px;
  color: var(--text);
}

@media (min-width: 768px) {
  .page {
    margin: 80px auto;
    padding: 0;
  }
}

.intro {
  text-transform: lowercase;
}

.intro .avatar {
  color: var(--icon-fg);
  margin: 40px 0 32px;
}

.intro .avatar img {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
}

h1 {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  margin: 6px 0 0;
  color: var(--text);
}

h1 .name {
  font-weight: 600;
}

.intro p {
  font-size: 14px;
  line-height: 25px;
  margin: 16px 0 0;
  color: var(--text-dim);
  width: 92%;
}

.intro p:first-of-type {
  margin-top: 32px;
}

a {
  color: inherit;
  text-decoration: none;
}

.intro p a {
  color: var(--text);
  text-transform: none;
}

.proper-noun {
  text-transform: none;
}

@media (prefers-color-scheme: dark) {
  .intro p a {
    color: var(--text-dimmer);
  }
}

.socials {
  display: flex;
  align-items: center;
  margin: 24px 0 0 -12px;
}

.socials a {
  padding: 12px;
  border-radius: 13px;
  color: #525252;
  display: flex;
}

@media (prefers-color-scheme: dark) {
  .socials a {
    color: #a3a3a3;
  }
}

.socials a:hover {
  background: var(--hover-bg);
}

.socials svg {
  width: 18px;
  height: 18px;
}

.section-title {
  margin: 40px 0 8px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dimmer);
  text-transform: lowercase;
}

.list {
  display: flex;
  flex-direction: column;
}

.item {
  display: flex;
  gap: 16px;
  padding: 16px 16px 0;
  margin: 0 -16px;
  border-radius: 12px;
}

.item:hover {
  background: var(--hover-bg);
}

.item-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--icon-bg);
  color: var(--icon-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.item-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-icon.round {
  border-radius: 10px;
}

.item-icon.square {
  border-radius: 10px;
}

.item-body {
  display: flex;
  flex-direction: column;
  flex: auto;
  font-size: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.item-body.last {
  border-bottom-color: transparent;
}

.item:hover .item-body {
  border-bottom-color: transparent;
}

.item-title {
  color: var(--text);
}

.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  color: var(--text-dim);
}

.item-meta .date {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  color: var(--text-dimmer);
  flex-shrink: 0;
}

.item-meta .tag {
  background: var(--chip-bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 12px;
  color: var(--text-dimmer);
  flex-shrink: 0;
}

@media (prefers-color-scheme: dark) {
  .item-meta .tag {
    border-color: rgba(255, 255, 255, 0.08);
  }
}

.footer {
  margin: 80px 0 160px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dimmer);
  text-transform: lowercase;
}

.theme-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--icon-bg);
  color: var(--icon-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--hover-bg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
