:root {
  --ink: #111;
  --paper: #fff;
  --bg1: #ffd6ec;
  --bg2: #d7e8ff;
  --bg3: #d9fbef;
  --accent: #ffe66d;
  --muted: #444;
  --line: #e4e4e4;
  --focus: #2563eb;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  line-height: 1.55;
  background: linear-gradient(160deg, var(--bg1) 0%, var(--bg2) 55%, var(--bg3) 100%) fixed;
  background-color: var(--bg2);
}
a { color: inherit; }
.top { text-align: center; padding: 28px 16px 8px; }
.top img { width: 100%; max-width: 340px; height: auto; }
main { max-width: 720px; margin: 0 auto; padding: 16px 16px 40px; }
.linkspage main { max-width: 560px; text-align: center; }

/* links page */
.avatar { width: 112px; height: 112px; border-radius: 50%; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: block; margin: 8px auto 12px; object-fit: cover; }
.name { font-size: 20px; font-weight: 700; margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.name img { width: 20px; height: 20px; }
.tagline { margin: 4px 0 18px; color: var(--muted); font-size: 15px; }
.socials { display: flex; justify-content: center; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.socials a { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); transition: transform .12s, box-shadow .12s; }
.socials svg { width: 22px; height: 22px; fill: currentColor; }
.links { display: flex; flex-direction: column; gap: 14px; }

/* buttons */
.btn { display: block; padding: 16px 18px; background: var(--paper); color: var(--ink); text-decoration: none; text-align: center; font: inherit; font-weight: 500; font-size: 16px; line-height: 1.3; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.btn.featured { background: var(--accent); font-weight: 700; }
.btn:hover, .socials a:hover, .copy:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active, .socials a:active, .copy:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* article pages */
.post { background: var(--paper); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); padding: 28px 22px; overflow-wrap: anywhere; }
.post h1 { font-size: clamp(24px, 6vw, 34px); line-height: 1.2; margin: 0 0 16px; }
.post h2 { font-size: 22px; margin: 28px 0 8px; }
.post h3 { font-size: 18px; margin: 22px 0 6px; }
.post .lede { color: var(--muted); font-size: 17px; margin-top: 0; }
.post.center { text-align: center; }
.post.app .links { margin-top: 18px; }
.content img, .content video { max-width: 100%; height: auto; border-radius: 12px; }
.content iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }
.content figure { margin: 18px 0; }
.content blockquote { margin: 16px 0; padding: 12px 16px; border-left: 4px solid var(--ink); background: #fafafa; border-radius: 0 10px 10px 0; }
.content pre, .content code { white-space: pre-wrap; font-size: 14px; background: #f5f5f5; border-radius: 6px; padding: 2px 4px; }
.content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.content td, .content th { border: 1px solid var(--line); padding: 6px 8px; }
.content .notice { border: 2px solid #c0392b; background: #fff3f1; border-radius: 12px; padding: 4px 14px; margin: 16px 0; }
.content .contact { border: 2px solid var(--ink); background: #fffbe6; border-radius: 12px; padding: 4px 14px; margin: 16px 0; }
.content .contact strong { display: block; }
.copy { margin-top: 20px; padding: 12px 18px; font: inherit; font-weight: 700; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 4px 4px 0 #888; cursor: pointer; transition: transform .12s, box-shadow .12s; }

/* forms */
.form { display: grid; gap: 16px; margin-top: 8px; }
.form label { display: grid; gap: 6px; font-weight: 500; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; width: 100%; padding: 12px; border: 2px solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink); }
.form input[type="file"] { padding: 10px; }
.form fieldset { border: 2px dashed #999; border-radius: 12px; padding: 12px 14px 16px; display: grid; gap: 14px; margin: 0; }
.form legend { color: var(--muted); font-size: 14px; padding: 0 6px; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form label.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .error { color: #b00020; font-weight: 500; }

.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 0 16px 36px; }
.foot nav { margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { .btn, .socials a, .copy { transition: none; } }
