:root {
    color-scheme: light;
    --accent: #6d5dfc;
}

.dark { color-scheme: dark; }

* { box-sizing: border-box; }

body {
    background-image: radial-gradient(circle at 15% 0%, rgba(109, 93, 252, .055), transparent 26rem);
}

button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }

.eyebrow {
    color: var(--accent);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.button-primary,
.button-secondary,
.icon-button {
    align-items: center;
    border-radius: .8rem;
    display: inline-flex;
    font-size: .875rem;
    font-weight: 650;
    justify-content: center;
    min-height: 2.65rem;
    padding: .65rem 1rem;
}

.button-primary { background: #171717; color: #fff; }
.button-primary:hover { background: var(--accent); transform: translateY(-1px); }
.dark .button-primary { background: #fff; color: #171717; }
.dark .button-primary:hover { background: #dcd7ff; }

.button-secondary,
.icon-button {
    background: rgba(255,255,255,.72);
    border: 1px solid #e7e5e4;
    color: #292524;
}
.button-secondary:hover, .icon-button:hover { border-color: #a8a29e; background: #fff; }
.dark .button-secondary, .dark .icon-button { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: #f5f5f4; }
.dark .button-secondary:hover, .dark .icon-button:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.22); }
.icon-button { height: 2.65rem; min-width: 2.65rem; padding: 0; }

.panel {
    background: rgba(255,255,255,.8);
    border: 1px solid #e7e5e4;
    border-radius: 1.25rem;
    box-shadow: 0 18px 45px rgba(0,0,0,.045);
}
.dark .panel { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.1); box-shadow: none; }

.hero-orb {
    background: radial-gradient(circle, rgba(109,93,252,.19), rgba(109,93,252,0) 68%);
    border-radius: 999px;
    filter: blur(1px);
    height: 26rem;
    pointer-events: none;
    position: absolute;
    right: -8rem;
    top: -11rem;
    width: 26rem;
}

.search-input {
    background: rgba(255,255,255,.75) !important;
    border: 1px solid #e7e5e4 !important;
    border-radius: .9rem !important;
    box-shadow: none !important;
    padding: .75rem 1rem .75rem 2.7rem !important;
    width: 100%;
}
.search-input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(109,93,252,.12) !important; }
.dark .search-input { background: rgba(255,255,255,.04) !important; border-color: rgba(255,255,255,.12) !important; }

.filter-chip {
    border: 1px solid transparent;
    border-radius: 999px;
    color: #78716c;
    flex: 0 0 auto;
    font-size: .8rem;
    font-weight: 650;
    padding: .55rem .85rem;
}
.filter-chip:hover { color: #171717; }
.filter-chip.is-active { background: #171717; color: white; }
.dark .filter-chip { color: #a8a29e; }
.dark .filter-chip:hover { color: white; }
.dark .filter-chip.is-active { background: white; color: #171717; }

.project-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.project-card {
    background: rgba(255,255,255,.84);
    border: 1px solid #e7e5e4;
    border-radius: 1.25rem;
    box-shadow: 0 14px 35px rgba(28,25,23,.035);
    overflow: hidden;
    position: relative;
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.project-card:hover { border-color: #d6d3d1; box-shadow: 0 22px 50px rgba(28,25,23,.1); transform: translateY(-4px); }
.dark .project-card { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.1); box-shadow: none; }
.dark .project-card:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.055); }
.project-card[hidden] { display: none; }

.project-media {
    aspect-ratio: 16 / 9;
    background: #f0efed;
    overflow: hidden;
    position: relative;
}
.dark .project-media { background: #202020; }
.project-media > img { height: 100%; object-fit: cover; transition: transform .45s ease; width: 100%; }
.project-card:hover .project-media > img { transform: scale(1.025); }
.media-placeholder {
    align-items: center;
    background: radial-gradient(circle at 25% 20%, #cbc5ff, transparent 36%), linear-gradient(135deg, #f5f5f4, #e7e5e4);
    display: flex;
    height: 100%;
    justify-content: center;
}
.dark .media-placeholder { background: radial-gradient(circle at 25% 20%, rgba(109,93,252,.5), transparent 38%), linear-gradient(135deg, #292929, #171717); }
.media-placeholder span { color: rgba(23,23,23,.68); font-size: 4rem; font-weight: 750; }
.dark .media-placeholder span { color: rgba(255,255,255,.72); }
.project-arrow {
    align-items: center;
    background: rgba(255,255,255,.9);
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    color: #171717;
    display: flex;
    height: 2.4rem;
    justify-content: center;
    opacity: 0;
    position: absolute;
    right: 1rem;
    top: 1rem;
    transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease;
    width: 2.4rem;
}
.project-card:hover .project-arrow { opacity: 1; transform: none; }

.badge {
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
    border-radius: 999px;
    color: #57534e;
    display: inline-flex;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: .28rem .55rem;
    text-transform: uppercase;
}
.dark .badge { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #d6d3d1; }
.badge-accent { background: #eeecff; border-color: #d8d3ff; color: #5547d8; }
.badge-green { background: #ecfdf5; border-color: #bbf7d0; color: #047857; }
.dark .badge-accent { background: rgba(109,93,252,.17); border-color: rgba(109,93,252,.35); color: #c8c2ff; }
.dark .badge-green { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.25); color: #6ee7b7; }

.empty-state { padding: 5rem 1rem; text-align: center; }
.empty-state h1, .empty-state h2 { font-size: 1.5rem; font-weight: 650; margin-top: 1rem; }
.empty-state p { color: #78716c; margin: .5rem auto 0; max-width: 34rem; }
.empty-icon { align-items: center; background: #e7e5e4; border-radius: 1rem; display: inline-flex; font-size: 1.25rem; font-weight: 700; height: 3.5rem; justify-content: center; width: 3.5rem; }
.dark .empty-icon { background: rgba(255,255,255,.1); }

.field { display: block; }
.field > span { display: block; font-size: .78rem; font-weight: 700; margin-bottom: .42rem; }
.field > small { color: #78716c; display: block; font-size: .7rem; margin: .45rem 0 .35rem; }
.field input:not([type=file]), .field textarea {
    background: rgba(255,255,255,.85) !important;
    border: 1px solid #d6d3d1 !important;
    border-radius: .75rem !important;
    box-shadow: none !important;
    font-size: .9rem;
    padding: .68rem .78rem !important;
    width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(109,93,252,.12) !important; }
.dark .field input:not([type=file]), .dark .field textarea { background: rgba(255,255,255,.055) !important; border-color: rgba(255,255,255,.13) !important; }
.field input[type=file] { color: #78716c; font-size: .75rem; width: 100%; }
.check-field { align-items: flex-start; border: 1px solid #e7e5e4; border-radius: .85rem; display: flex; gap: .7rem; padding: .8rem; }
.dark .check-field { border-color: rgba(255,255,255,.12); }
.check-field input { border-radius: .3rem; color: var(--accent); margin-top: .15rem; }
.check-field strong, .check-field small { display: block; }
.check-field strong { font-size: .82rem; }
.check-field small { color: #78716c; font-size: .7rem; margin-top: .12rem; }

.admin-table { border-collapse: collapse; font-size: .82rem; min-width: 760px; width: 100%; }
.admin-table th { color: #78716c; font-size: .66rem; letter-spacing: .08em; padding: 1rem 1.2rem; text-align: left; text-transform: uppercase; }
.admin-table td { border-top: 1px solid #e7e5e4; padding: .9rem 1.2rem; }
.dark .admin-table td { border-color: rgba(255,255,255,.08); }
.admin-table tr { transition: background-color .2s ease, opacity .2s ease; }
.admin-table tr.is-reordering { opacity: .55; }
.admin-table tr.reorder-complete { background: rgba(109,93,252,.08); }
.order-controls { align-items: center; display: inline-flex; gap: .45rem; }
.order-controls [data-order-value] { color: #78716c; min-width: 2rem; text-align: center; }
.order-arrow {
    align-items: center;
    border: 1px solid #d6d3d1;
    border-radius: .55rem;
    color: #57534e;
    display: inline-flex;
    font-size: 1rem;
    height: 2rem;
    justify-content: center;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
    width: 2rem;
}
.order-arrow:hover:not(:disabled) { background: #f5f5f4; border-color: var(--accent); color: var(--accent); }
.order-arrow:disabled { cursor: not-allowed; opacity: .3; }
.dark .order-arrow { border-color: rgba(255,255,255,.16); color: #d6d3d1; }
.dark .order-arrow:hover:not(:disabled) { background: rgba(255,255,255,.08); border-color: #c8c2ff; color: #c8c2ff; }
.dark .admin-table tr.reorder-complete { background: rgba(109,93,252,.14); }
.button-link { color: var(--accent); font-weight: 700; }
.button-link:hover { text-decoration: underline; }

.project-dialog {
    background: transparent;
    border: 0;
    color: inherit;
    max-height: 95vh;
    max-width: 46rem;
    padding: 1rem;
    width: 100%;
}
.project-dialog::backdrop { background: rgba(12,10,9,.58); backdrop-filter: blur(5px); }
.dialog-card { background: #fafaf9; border: 1px solid #e7e5e4; border-radius: 1.35rem; box-shadow: 0 30px 90px rgba(0,0,0,.2); max-height: calc(95vh - 2rem); overflow-y: auto; padding: 1.5rem; }
.dark .dialog-card { background: #171717; border-color: rgba(255,255,255,.13); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

