:root {
  color-scheme: light dark;
  --page: #f7f7f7;
  --ink: #242424;
  --muted: #666666;
  --copy: #666666;
  --hover: #ebebeb;
  --pressed: #dedede;
  --rule: #dddddd;
  --sun: none;
  --moon: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) {
    --page: #181818; --ink: #eeeeee; --muted: #aaaaaa; --copy: #aaaaaa;
    --hover: #252525; --pressed: #303030; --rule: #333333; --sun: flex; --moon: none;
  }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) {
  color-scheme: dark;
  --page: #181818; --ink: #eeeeee; --muted: #aaaaaa; --copy: #aaaaaa;
  --hover: #252525; --pressed: #303030; --rule: #333333; --sun: flex; --moon: none;
}
:root:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
* { box-sizing: border-box; }
html { background: var(--page); overscroll-behavior: none; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; margin: 0; color: var(--ink); -webkit-font-smoothing: antialiased; }
a, button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 16px; transform: translateY(-150%); background: var(--page); padding: 12px 20px; z-index: 5; }
.skip-link:focus { transform: none; }
.page { flex-shrink: 0; width: min(100% - 48px, 600px); margin: 88px auto 0; }
.profile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.profile-controls { display: flex; align-items: center; gap: 6px; }
.portrait { display: block; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.theme-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; transition: background-color 120ms ease, color 120ms ease, transform 150ms cubic-bezier(.25,.46,.45,.94); }
.theme-toggle[hidden] { display: none; }
.theme-toggle:active { background: var(--pressed); transform: scale(.97); }
.theme-sun { display: var(--sun); }
.theme-moon { display: var(--moon); }
h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.8px; font-weight: 600; margin: 0 0 12px; }
.role { font-size: 16px; line-height: 1.65; color: var(--muted); margin: 0; }
.role-dot { padding-inline: 3px; }
.role-builder { white-space: nowrap; }
.work-section { margin-top: 56px; }
.work-section h2 { margin: 0 0 20px; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--muted); }
.entries { display: grid; gap: 8px; }
.entry { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 20px; padding: 16px; margin-inline: -16px; border-radius: 16px; text-decoration: none; transition: background-color 120ms ease; }
.entry-copy { display: block; min-width: 0; }
.entry-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 18px; font-weight: 500; line-height: 1.4; letter-spacing: -.2px; }
.entry-arrow { color: var(--muted); flex-shrink: 0; transform: translate(0, 0); transition: transform 150ms cubic-bezier(.19,1,.22,1); }
.entry-description { display: block; font-size: 16px; line-height: 1.65; color: var(--copy); margin-top: 7px; max-width: 440px; }
.project-icon { --icon-size: 48px; width: var(--icon-size); height: var(--icon-size); aspect-ratio: 1; display: grid; place-items: center; place-self: center; }
.project-icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mazemiz-icon img { border-radius: 25%; }
.colorslab-icon { background: #fff; border-radius: 25%; }
/* The original 209×114 wordmark's symbol occupies x=171…209.
   Cover exposes x=95…209; keep just the symbol and center that visible area. */
.colorslab-icon img { object-fit: cover; object-position: right center; clip-path: inset(0 0 0 66.6667%); transform: translate(-33.3333%, -4.38596%); }
.writing-section { margin-top: 48px; }
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover { background: var(--hover); color: var(--ink); }
  .entry:hover { background: var(--hover); }
  .entry:hover .entry-arrow { transform: translate(var(--arrow-hover-x, 2px), -2px); }
}
.entry:active { background: var(--pressed); }
@media (max-width: 600px) {
  .page { margin-top: 40px; }
  h1 { font-size: 28px; }
  .role-builder { display: block; }
  .role-dot { display: none; }
  .work-section { margin-top: 40px; }
  .entry { gap: 14px; grid-template-columns: 48px minmax(0, 1fr); padding: 14px 10px; margin-inline: -10px; border-radius: 12px; }
  .project-icon { --icon-size: 44px; }
  .entry-description { font-size: 15px; line-height: 1.65; }
  .writing-section { margin-top: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .entry-arrow { transition: none; }
  .entry:hover .entry-arrow, .theme-toggle:active { transform: none; }
  .theme-toggle { transition: background-color 120ms ease, color 120ms ease; }
}

.contact-section { margin-top: 48px; }
.contact-section h2 { margin-bottom: 12px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0 -12px; padding: 0; }
.contact-links a { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 12px; border-radius: 999px; color: var(--ink); font-size: 15px; line-height: 24px; text-decoration: none; }
.contact-links a > svg { display: block; flex-shrink: 0; width: 18px; height: 18px; color: inherit; }
.contact-links a { direction: inherit; }
.contact-links a:active { background: var(--pressed); }
.page-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; flex-shrink: 0; width: min(100% - 48px, 600px); margin: auto auto 0; padding: 56px 0 40px; color: var(--muted); }
.page-footer small { font-size: 13px; line-height: 1.5; }
@media (hover: hover) and (pointer: fine) { .contact-links a:hover { background: var(--hover); } }
@media (max-width: 600px) {
  .contact-section { margin-top: 36px; }
  .contact-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 0; }
  .contact-links a { min-height: 44px; }
  .page-footer { padding-top: 40px; padding-bottom: 28px; }
}
