:root {
    --navy: #102c62;
    --blue: #2468d8;
    --blue-dark: #174aab;
    --ice: #edf5ff;
    --ink: #172b4d;
}

* { box-sizing: border-box; }

body { color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

.public-body {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 3%, #d8eaff 0, #edf5ff 36rem, #f7faff 70rem);
    display: flex;
    flex-direction: column;
}

.public-shell { width: min(100% - 2rem, 540px); margin: auto; padding: 3.25rem 0 2rem; flex: 1; }
.profile-card { text-align: center; }
.avatar-wrap { width: 106px; height: 106px; border: 4px solid rgba(255,255,255,.9); border-radius: 50%; margin: 0 auto 1rem; box-shadow: 0 10px 28px rgba(27, 83, 164, .18); overflow: hidden; background: linear-gradient(145deg, #64a7ff, #2156b9); display: grid; place-items: center; }
.avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { color: white; font-size: 2.5rem; }
.profile-eyebrow { color: #3975c9; font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; margin-bottom: .35rem; }
.profile-name { color: var(--navy); font-size: clamp(1.8rem, 8vw, 2.35rem); font-weight: 800; letter-spacing: -.045em; margin-bottom: .55rem; }
.profile-bio { color: #526987; line-height: 1.65; max-width: 430px; margin: 0 auto; white-space: pre-line; }
.links-list { display: grid; gap: .82rem; margin-top: 2rem; }
.bio-link { display: flex; align-items: center; gap: .85rem; min-height: 68px; color: var(--navy); background: rgba(255,255,255,.88); border: 1px solid #d7e6fa; border-radius: 17px; padding: .85rem 1rem; text-decoration: none; box-shadow: 0 7px 18px rgba(28, 70, 128, .055); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.bio-link:hover, .bio-link:focus-visible { color: var(--blue-dark); transform: translateY(-2px); border-color: #91b8f1; box-shadow: 0 12px 25px rgba(28, 70, 128, .12); }
.link-icon { width: 42px; height: 42px; border-radius: 13px; flex: 0 0 42px; display: grid; place-items: center; background: var(--ice); font-size: 1.35rem; }
.link-copy { min-width: 0; text-align: left; flex: 1; }
.link-title { font-weight: 750; line-height: 1.25; }
.link-caption { color: #8292a8; font-size: .76rem; margin-top: .2rem; }
.link-arrow { color: #80a5d8; font-size: 1.15rem; padding: 0 .2rem; }
.empty-links { border: 1px dashed #bdd3f0; border-radius: 16px; padding: 1.2rem; color: #617998; background: rgba(255,255,255,.6); }
.public-footer { padding: .5rem 1rem 1.5rem; text-align: center; color: #8092ad; font-size: .78rem; }
.footer-book { color: #3a78cf; }

.admin-body { min-height: 100vh; background: #f4f7fc; }
.admin-nav { background: var(--navy); box-shadow: 0 4px 18px rgba(11, 34, 76, .16); }
.admin-nav .navbar-brand { letter-spacing: -.02em; }
.brand-mark { color: #90b7f3; font-size: .78rem; font-weight: 600; }
.admin-container { max-width: 1040px; }
.admin-title { color: var(--navy); font-weight: 800; letter-spacing: -.035em; }
.admin-card { border: 1px solid #e0e8f4; border-radius: 18px; box-shadow: 0 8px 24px rgba(33, 64, 110, .045); }
.admin-card .card-body { padding: clamp(1.15rem, 4vw, 1.65rem); }
.form-label { color: #263e62; font-weight: 650; }
.form-control, .form-select { border-color: #d3deed; border-radius: 11px; padding: .72rem .85rem; }
.form-control:focus, .form-select:focus { border-color: #6da0e9; box-shadow: 0 0 0 .22rem rgba(36, 104, 216, .12); }
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue-dark); --bs-btn-hover-border-color: var(--blue-dark); border-radius: 10px; font-weight: 650; }
.stat-card { background: linear-gradient(135deg, #fff, #f4f8ff); }
.stat-number { color: var(--blue); font-size: 2rem; line-height: 1; font-weight: 800; }
.table > :not(caption) > * > * { padding: .9rem .75rem; vertical-align: middle; }
.table thead th { color: #71829a; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; }
.table-link-title { color: var(--navy); font-weight: 700; }
.url-truncate { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #71829a; font-size: .86rem; }
.auth-wrap { width: min(100% - 2rem, 460px); margin: 8vh auto; }
.auth-brand { text-align: center; margin-bottom: 1.5rem; color: var(--navy); font-size: 1.4rem; font-weight: 850; }
.muted-help { color: #71829a; font-size: .87rem; }

@media (max-width: 575.98px) {
    .public-shell { padding-top: 2.2rem; }
    .bio-link { min-height: 64px; border-radius: 15px; }
    .admin-container { padding-inline: 1rem; }
    .url-truncate { max-width: 175px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
