:root { color-scheme: light; --ink: #111; --muted: #666; --line: rgba(17,17,17,.12); --accent: #1677ff; --surface: rgba(255,255,255,.86); }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 15px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at 15% 0%, #e9f3ff 0, transparent 32%), linear-gradient(135deg, #f8fafc, #eef1f5); }
body.theme-minimal { --accent: #111; background: radial-gradient(circle at 80% 0%, #fff 0, transparent 35%), linear-gradient(135deg, #fff, #f1f3f5); }
body.theme-dark { color-scheme: dark; --ink: #f6f8fb; --muted: #aab4c0; --line: rgba(255,255,255,.16); --surface: rgba(20,24,31,.86); background: radial-gradient(circle at 50% 0%, #183553 0, transparent 38%), linear-gradient(135deg, #090b0f, #111820); }
.page { width: min(100% - 32px, 680px); margin: 0 auto; padding: 42px 0 30px; }
.profile { text-align: center; }
.avatar { width: 88px; height: 88px; object-fit: cover; border: 2px solid rgba(255,255,255,.9); border-radius: 50%; box-shadow: 0 14px 38px rgba(14, 45, 77, .18); background: #dce8f5; }
.brand { margin: 15px 0 2px; font-size: clamp(25px, 7vw, 36px); letter-spacing: -.04em; }
.name { margin: 0; color: var(--muted); font-size: 14px; }
.bio { max-width: 520px; margin: 12px auto 28px; color: var(--muted); }
.group { margin: 26px 0 0; }
.group-title { margin: 0 0 10px 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.links { display: grid; gap: var(--gap, 14px); }
.link-card { display: flex; align-items: center; gap: 13px; min-height: 64px; padding: 12px 16px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius, 18px); background: var(--surface); box-shadow: 0 7px 24px rgba(18, 36, 56, .07); transition: transform .18s cubic-bezier(.2,.8,.2,1), border-color .18s ease, box-shadow .18s ease; }
.link-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 13px 30px rgba(18, 36, 56, .13); }
.link-icon { flex: 0 0 26px; color: var(--accent); font-size: 23px; }
.link-image { width: 32px; height: 32px; flex: 0 0 32px; object-fit: cover; border-radius: 10px; }
.link-copy { min-width: 0; text-align: left; }
.link-title { display: block; font-weight: 700; }
.link-description { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { margin-left: auto; padding: 5px 9px; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; font-size: 12px; }
.site-footer { margin-top: 34px; color: var(--muted); text-align: center; font-size: 12px; }
.site-footer a { color: inherit; }
.status { padding: 30px 0; color: var(--muted); text-align: center; }
@media (max-width: 480px) { .page { width: min(100% - 22px, 680px); padding-top: 28px; } .bio { margin-bottom: 22px; } }

/* Admin uses the same visual language, but keeps controls compact. */
.admin-page { width: min(100% - 28px, 940px); }
.admin-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.admin-header h1 { margin: 0; font-size: 28px; }
.admin-header p { margin: 5px 0 0; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(0, 1.2fr); gap: 18px; }
.panel { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 7px 24px rgba(18, 36, 56, .07); }
.panel h2 { margin: 0 0 14px; font-size: 18px; }
label { display: grid; gap: 5px; margin: 11px 0; color: var(--muted); font-size: 12px; font-weight: 700; }
input, textarea, select { width: 100%; padding: 9px 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: transparent; font: inherit; }
textarea { min-height: 70px; resize: vertical; }
button { padding: 9px 13px; color: #fff; border: 0; border-radius: 10px; background: var(--accent); cursor: pointer; font: inherit; }
button.secondary { color: var(--ink); border: 1px solid var(--line); background: transparent; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.link-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.link-row:first-child { border-top: 0; }
.link-row strong { display: block; }
.link-row small { color: var(--muted); }
.row-actions { display: flex; align-items: start; gap: 6px; }
.row-actions button { padding: 6px 9px; font-size: 12px; }
.error { margin: 8px 0; color: #c23b3b; }
@media (max-width: 760px) { .admin-grid { grid-template-columns: 1fr; } .admin-header { align-items: start; flex-direction: column; } }
