@charset "utf-8";
/* Theme: colors are the variables below; everything else is layout. Content lives in _data/profile.yml, not here. */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #fbfaf8;
  --fg: #1c1b19;
  --muted: #5e5a55;
  --line: #e4e0da;
  --accent: #1d4ed8;
  --chip: #f1eee9;
  --peel-under: #0f1115;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --fg: #ececec;
  --muted: #a1a1aa;
  --line: #2a2d34;
  --accent: #7aa7ff;
  --chip: #171a20;
  --peel-under: #fbfaf8;
}
[data-theme="matrix"] {
  color-scheme: dark;
  --bg: #020a03;
  --fg: #8dffa0;
  --muted: #3fae5a;
  --line: #0f3a1a;
  --accent: #39ff6a;
  --chip: #05140a;
  --peel-under: #0f1115;
}
[data-theme="matrix"] body { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-shadow: 0 0 6px rgba(57, 255, 106, .25); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0f1115;
    --fg: #ececec;
    --muted: #a1a1aa;
    --line: #2a2d34;
    --accent: #7aa7ff;
    --chip: #171a20;
    --peel-under: #fbfaf8;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  position: relative;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .theme-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.hero { padding: 72px 0 36px; }
.hero h1 { margin: 0; font-size: 2.2rem; line-height: 1.15; font-weight: 700; }
.hero .role { margin: 6px 0 20px; color: var(--muted); font-size: 1.05rem; }
.hero .tagline { margin: 0 0 20px; max-width: 64ch; }
.links { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 0; margin: 0; list-style: none; }

section { display: grid; grid-template-columns: 140px 1fr; gap: 0 32px; padding: 28px 0; border-top: 1px solid var(--line); }
section > h2 { margin: 4px 0 0; font-size: .95rem; font-weight: 600; color: var(--muted); }
section p { margin: 0 0 8px; }
section p:last-child { margin-bottom: 0; }
.item { margin-bottom: 26px; }
.item:last-child { margin-bottom: 0; }
.item h3 { margin: 0; font-size: 1rem; }
.item .meta { color: var(--muted); font-size: .9rem; }
.item-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; }
.item-head .meta { white-space: nowrap; }
.item ul { margin: 8px 0 0; padding-left: 20px; }
.item li { margin-bottom: 4px; }
.item p { margin: 6px 0 0; }
.skills { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 0; }
.skills dt { font-weight: 600; }
.skills dd { margin: 0; }

.theme-link { position: absolute; top: 18px; right: 20px; z-index: 5; border: 0; background: none; color: var(--muted); font: inherit; font-size: .9rem; cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.theme-link:hover { color: var(--fg); }

.site-foot { display: flex; justify-content: space-between; padding: 24px 20px 64px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  .hero { padding-top: 56px; }
  .hero h1 { font-size: 1.8rem; }
  section { grid-template-columns: 1fr; padding: 24px 0; }
  section > h2 { margin: 0 0 12px; }
  .skills { grid-template-columns: 1fr; gap: 0; }
  .skills dd { margin-bottom: 10px; }
}

/* Page peel: drag the bottom-right corner of the page in any direction to switch theme.
   The fold geometry is drawn by assets/js/theme.js; these rules only style the pieces. */
body { min-height: 100vh; }
.peel { position: absolute; right: 0; bottom: 0; width: 40px; height: 40px; z-index: 20; cursor: grab; touch-action: none; filter: drop-shadow(-4px -4px 6px rgba(0, 0, 0, .35)) drop-shadow(-1px -1px 1px rgba(0, 0, 0, .25)); }
.peel:active { cursor: grabbing; }
.peel.active { opacity: 0; }
.peel::before, .peel::after { content: ""; position: absolute; inset: 0; }
.peel::before { background: var(--peel-under); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.peel::after { background: linear-gradient(to bottom right, var(--chip) 0%, var(--line) 62%, var(--muted) 100%); clip-path: polygon(0 0, 100% 0, 0 100%); }
.reveal { position: fixed; inset: 0; z-index: 15; overflow: hidden; pointer-events: none; background: var(--bg); color: var(--fg); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.reveal-inner { position: absolute; top: 0; left: 0; }
.reveal-shade { position: absolute; inset: 0; }
.flap-wrap { position: fixed; inset: 0; z-index: 16; pointer-events: none; }
.flap { position: absolute; inset: 0; }

/* Easter eggs: only added to the page when triggered (see assets/js/eggs.js) */
.egg-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 40; max-width: min(92vw, 560px); padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--chip); color: var(--fg); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); font-size: .95rem; animation: egg-in .25s ease; }
@keyframes egg-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.egg-term-back { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.egg-term { width: min(100%, 760px); height: min(70vh, 520px); display: flex; flex-direction: column; background: #0b0d10; color: #d7e0d9; border: 1px solid #2a2d34; border-radius: 10px; box-shadow: 0 16px 48px rgba(0, 0, 0, .5); font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow: hidden; }
.egg-term-out { flex: 1; overflow-y: auto; padding: 14px 16px 4px; scrollbar-width: thin; scrollbar-color: #3a4048 transparent; }
.egg-term-out::-webkit-scrollbar { width: 8px; }
.egg-term-out::-webkit-scrollbar-track { background: transparent; }
.egg-term-out::-webkit-scrollbar-thumb { background: #3a4048; border-radius: 4px; }
.egg-term-out::-webkit-scrollbar-thumb:hover { background: #55606b; }
.egg-term-line { white-space: pre-wrap; word-break: break-word; }
.egg-term-cmd { color: #8fd18f; }
.egg-term-dim { color: #7b8794; }
.egg-term-strong { color: #ffffff; font-weight: 600; }
.egg-term a { color: #7aa7ff; }
.egg-term-row { display: flex; gap: 8px; padding: 8px 16px 14px; align-items: center; }
.egg-term-prompt { color: #8fd18f; white-space: nowrap; }
.egg-typing { white-space: pre-wrap; word-break: break-word; margin: 6px 0; padding: 8px 10px; border: 1px solid #2a2d34; border-radius: 6px; font-size: 15px; line-height: 1.7; color: #7b8794; }
.egg-typing .ok { color: #8fd18f; }
.egg-typing .bad { color: #ff7b7b; background: rgba(255, 107, 107, .22); }
.egg-typing .cur { color: #fff; background: #2f3640; border-radius: 2px; }
.egg-term-row.typing .egg-term-prompt { visibility: hidden; }
.egg-term-row.typing .egg-term-input { color: transparent; caret-color: transparent; }
.egg-term-input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; caret-color: #8fd18f; }
.egg-help-back { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.egg-help { width: min(100%, 340px); padding: 16px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--fg); box-shadow: 0 12px 40px rgba(0, 0, 0, .4); }
.egg-help-title { font-weight: 700; margin-bottom: 10px; }
.egg-help-row { display: flex; gap: 16px; padding: 3px 0; }
.egg-help-keys { min-width: 56px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--accent); }
.egg-rain { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.status-summary { font-size: 1.2rem; margin: 0 0 16px; }
.status-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 0 0 16px; }
.status-list dt { font-weight: 600; }
.status-list dd { margin: 0; }
.notfound { padding: 48px 0; }
.notfound-code { margin: 0; font-size: 4.5rem; font-weight: 700; line-height: 1; }
.notfound-line { margin: 8px 0 16px; font-size: 1.2rem; }
.notfound-joke { color: var(--muted); max-width: 52ch; }
@media (prefers-reduced-motion: reduce) { .egg-toast { animation: none; } }

@media print {
  :root { --bg: #fff; --fg: #000; --muted: #444; --line: #bbb; --accent: #000; --chip: #fff; }
  body { font-size: 11pt; }
  .hero { padding-top: 0; }
  section { padding: 12px 0; break-inside: avoid; }
  .site-foot, .topnav, .theme-link, .peel, .reveal, .flap-wrap, .egg-toast, .egg-term-back, .egg-help-back { display: none; }
  a { text-decoration: none; }
}

/* Document pages: blog archive, posts and privacy policies */
.topnav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding-top: 24px; padding-bottom: 8px; padding-right: 120px; }
.topnav .brand { font-weight: 700; color: var(--fg); }
.topnav span a { margin-left: 16px; }
.doc-main { padding-top: 24px; padding-bottom: 32px; }
.doc-main h1, .post-title { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; }
.doc-main h2 { font-size: 1.35rem; margin: 32px 0 8px; }
.doc-main h3 { font-size: 1.1rem; margin: 24px 0 6px; }
.doc-main p, .doc-main li { max-width: 72ch; }
.doc-main ul, .doc-main ol { padding-left: 22px; }
.doc-main hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.doc-main img { max-width: 100%; height: auto; }
.doc-main blockquote { margin: 16px 0; padding: 2px 16px; border-left: 3px solid var(--accent); color: var(--muted); }
.doc-main table { border-collapse: collapse; display: block; overflow-x: auto; margin: 16px 0; }
.doc-main th, .doc-main td { border: 1px solid var(--line); padding: 6px 12px; text-align: left; vertical-align: top; }
.doc-main th { background: var(--chip); }
.doc-main code { background: var(--chip); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: .9em; }
.doc-main pre { background: var(--chip); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow-x: auto; }
.doc-main pre code { background: none; border: 0; padding: 0; }
.post-meta { color: var(--muted); font-size: .9rem; margin: 0; }
.post-header { margin-bottom: 16px; }
.post-list { list-style: none; padding: 0; margin: 16px 0 0; }
.post-list li { margin-bottom: 16px; }
.post-list h2 { margin: 0; font-size: 1.15rem; }
.highlight .c, .highlight .c1, .highlight .cm, .highlight .cp { color: var(--muted); font-style: italic; }
.highlight .k, .highlight .kt, .highlight .kd, .highlight .kr { color: var(--accent); font-weight: 600; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sc { color: #b45309; }
.highlight .mi, .highlight .mf { color: #0f766e; }

.doc-main .post-list { padding-left: 0; }
.doc-main figure { margin: 16px 0; }
