:root {
    --bg: #060606;
    --bg-soft: #111111;
    --bg-card: rgba(20, 20, 20, 0.84);
    --line: rgba(255, 208, 0, 0.16);
    --line-strong: rgba(255, 208, 0, 0.45);
    --text: #fff8d6;
    --muted: #baa95e;
    --accent: #ffd000;
    --accent-strong: #ffea70;
    --danger: #ff5d4d;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(255, 208, 0, 0.2), transparent 34%),
        radial-gradient(circle at 85% 12%, rgba(255, 208, 0, 0.16), transparent 22%),
        linear-gradient(180deg, #0d0d0d 0%, #050505 100%);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background: transparent;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 208, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 208, 0, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 90%);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
textarea {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px clamp(20px, 5vw, 56px);
    background: rgba(8, 8, 8, 0.8);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.brand,
h1,
h2,
h3 {
    font-family: "Space Grotesk", sans-serif;
}

.brand {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 56px;
}

.panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(25, 25, 25, 0.88), rgba(11, 11, 11, 0.94));
    box-shadow: var(--shadow);
}

.panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(140deg, rgba(255, 208, 0, 0.1), transparent 34%);
    opacity: 0.8;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

.helper-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.flash-stack {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.flash {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 208, 0, 0.08);
}

.flash-error {
    border-color: rgba(255, 93, 77, 0.45);
    background: rgba(255, 93, 77, 0.12);
}

.flash-success {
    border-color: rgba(255, 208, 0, 0.35);
    background: rgba(255, 208, 0, 0.12);
}

.auth-page .page-shell,
.public-page .page-shell {
    width: min(1320px, calc(100% - 32px));
}

.auth-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 28px;
    min-height: calc(100vh - 120px);
    align-items: center;
}

.auth-copy {
    padding: clamp(16px, 4vw, 32px);
}

.auth-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2.7rem, 8vw, 5.5rem);
    line-height: 0.95;
}

.auth-copy p {
    max-width: 580px;
    color: #f6e8a8;
    font-size: 1.08rem;
    line-height: 1.7;
}

.auth-panel,
.form-panel {
    padding: clamp(24px, 4vw, 32px);
}

.auth-panel {
    display: grid;
    gap: 18px;
}

.field,
.field-row {
    display: grid;
    gap: 10px;
}

.field span,
.socials-builder-header span,
.label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

input,
textarea {
    width: 100%;
    padding: 14px 16px;
    color: var(--text);
    border: 1px solid rgba(255, 208, 0, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.32);
    outline: none;
    transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

input:focus,
textarea:focus {
    border-color: var(--line-strong);
    background: rgba(0, 0, 0, 0.48);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.primary-button {
    color: #090909;
    background: var(--accent);
    border: 1px solid transparent;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.text-link:hover {
    transform: translateY(-1px);
}

.secondary-button {
    color: var(--accent);
    border: 1px solid rgba(255, 208, 0, 0.35);
    background: rgba(255, 208, 0, 0.08);
}

.ghost-button {
    color: var(--text);
    border: 1px solid rgba(255, 208, 0, 0.18);
    background: transparent;
    cursor: pointer;
}

.ghost-link,
.text-link {
    color: var(--accent);
}

.danger-button {
    color: #ffb3ab;
    border: 1px solid rgba(255, 93, 77, 0.4);
    background: rgba(255, 93, 77, 0.12);
    cursor: pointer;
}

.dashboard-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dashboard-header h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.4rem);
}

.dashboard-header p {
    margin: 0;
    max-width: 700px;
    color: #f2dea0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.profile-card {
    padding: 24px;
}

.profile-card-top,
.profile-card-actions,
.form-actions,
.socials-builder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.profile-card h2,
.form-panel h2,
.info-panel h2,
.empty-state h1,
.empty-state h2 {
    margin: 14px 0 10px;
}

.profile-card-bio {
    min-height: 84px;
    color: #f3e4a8;
    line-height: 1.65;
}

.id-pill,
.read-only-box {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 208, 0, 0.2);
    background: rgba(255, 208, 0, 0.1);
    color: var(--accent);
    font-weight: 800;
}

.read-only-box {
    width: 100%;
    justify-content: space-between;
    margin-bottom: 22px;
    border-radius: var(--radius-sm);
}

.empty-state {
    display: grid;
    justify-items: start;
    gap: 14px;
    padding: 32px;
}

.editor-grid,
.public-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

.form-panel {
    display: grid;
    align-content: start;
    gap: 18px;
}

.photo-preview {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 208, 0, 0.18);
}

.photo-preview img,
.hero-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f5e6a8;
}

.checkbox-line input {
    width: auto;
}

.socials-builder {
    display: grid;
    gap: 12px;
}

#socials-list {
    display: grid;
    gap: 12px;
}

.social-row {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr auto;
    gap: 10px;
}

.icon-button {
    width: 46px;
    height: 46px;
    color: var(--accent);
    border: 1px solid rgba(255, 208, 0, 0.18);
    border-radius: 14px;
    background: transparent;
    cursor: pointer;
}

.form-actions {
    justify-content: flex-start;
    padding-top: 8px;
}

.public-card {
    display: grid;
    gap: 20px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) 1.1fr;
    min-height: 520px;
}

.hero-photo-wrap {
    position: relative;
    overflow: hidden;
}

.hero-photo-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.55));
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: end;
    gap: 16px;
    padding: clamp(28px, 5vw, 44px);
}

.hero-brand-badge {
    position: absolute;
    top: clamp(24px, 3vw, 34px);
    right: clamp(24px, 3vw, 34px);
    display: inline-flex;
}

.hero-brand-image {
    display: block;
    width: clamp(154px, 15vw, 188px);
    height: auto;
}

.hero-content h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 4.8rem);
    line-height: 0.95;
}

.hero-subtitle {
    margin: 0;
    color: var(--accent-strong);
    font-size: 1.12rem;
}

.hero-bio {
    margin: 0;
    max-width: 60ch;
    color: #f5e7ab;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.add-contact-button {
    min-width: 220px;
}

.placeholder-photo {
    display: grid;
    place-items: center;
    font-family: "Space Grotesk", sans-serif;
    font-size: 7rem;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(255, 208, 0, 0.3), rgba(255, 208, 0, 0.12));
}

.info-panel {
    display: grid;
    align-content: start;
    gap: 16px;
    padding: 28px;
}

.section-heading {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 208, 0, 0.16);
    background: rgba(255, 208, 0, 0.06);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.contact-list,
.social-list {
    display: grid;
    gap: 12px;
}

.contact-item,
.social-item {
    display: grid;
    grid-template-columns: minmax(96px, 128px) minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    min-height: 88px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 208, 0, 0.14);
    background: rgba(255, 208, 0, 0.05);
}

.contact-label {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-item strong,
.social-item strong {
    justify-self: end;
    text-align: right;
    overflow-wrap: anywhere;
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.social-item > span {
    color: var(--text);
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.contact-item:hover,
.social-item:hover {
    border-color: rgba(255, 208, 0, 0.24);
    background: rgba(255, 208, 0, 0.08);
}

@media (max-width: 1024px) {
    .auth-layout,
    .editor-grid,
    .public-content-grid,
    .hero,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header,
    .topbar,
    .topbar-actions,
    .profile-card-actions {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .page-shell,
    .auth-page .page-shell,
    .public-page .page-shell {
        width: min(100% - 20px, 100%);
        padding-top: 20px;
    }

    .field-row,
    .social-row {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-photo-wrap {
        aspect-ratio: 4 / 5;
    }

    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-content {
        justify-items: center;
        text-align: center;
    }

    .hero-brand-badge {
        position: static;
        margin: 0 auto 10px;
    }

    .hero-subtitle,
    .hero-bio {
        text-align: center;
    }

    .hero-actions {
        width: 100%;
        justify-content: center;
    }

    .hero-actions .primary-button,
    .hero-actions .secondary-button {
        width: min(100%, 320px);
    }

    .add-contact-button {
        margin: 0 auto;
    }

    .info-panel {
        padding: 22px 18px;
    }

    .contact-item,
    .social-item {
        grid-template-columns: minmax(82px, 104px) minmax(0, 1fr);
        gap: 14px;
        min-height: 82px;
        padding: 16px 16px 16px 18px;
    }

    .contact-item strong,
    .social-item strong {
        font-size: 1rem;
    }

    .public-card {
        gap: 16px;
    }
}
