:root {
    --bg: #08111f;
    --bg-soft: #101d31;
    --panel: rgba(12, 22, 40, 0.72);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #eff4ff;
    --muted: #9cb0d1;
    --accent: #ff7a18;
    --accent-2: #35c2ff;
    --accent-soft: #f6d7bf;
    --success: #8cf0b5;
    --danger: #ff8797;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(53, 194, 255, 0.22), transparent 30%),
        radial-gradient(circle at right, rgba(255, 122, 24, 0.18), transparent 24%),
        linear-gradient(180deg, #06101c 0%, #08111f 50%, #0b1425 100%);
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
p { color: var(--muted); line-height: 1.8; }
h1, h2, h3 { margin: 0 0 0.75rem; font-family: 'Syne', sans-serif; line-height: 1.05; }

.site-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 72px; }
.site-header, .site-footer, .hero-section, .section-grid, .page-hero, .filter-bar, .project-grid, .detail-body, .gallery-grid, .dashboard-grid, .dashboard-actions, .pagination-row { margin-top: 24px; }
.site-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 22px 0 8px;
}
.brand-mark {
    width: 52px; height: 52px; display: grid; place-items: center; border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), #ffb36d); color: #08111f; font-weight: 800;
}
.site-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); }
.nav-logout-form { margin: 0; }
.nav-link-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    padding: 0;
    cursor: pointer;
}
.nav-link-button:hover { color: var(--text); }
.site-nav a:hover, .text-link:hover { color: var(--text); }

.hero-section, .detail-layout {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 34px; align-items: stretch;
}
.hero-section { min-height: 72vh; padding-top: 52px; }
.hero-copy, .page-hero, .form-shell { padding: 28px 0; }
.hero-copy h1, .page-hero h1 { font-size: clamp(3rem, 8vw, 6rem); max-width: 11ch; }
.hero-text { font-size: 1.12rem; max-width: 62ch; }
.eyebrow, .mini-meta {
    text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.75rem; color: var(--accent-2);
}
.hero-actions, .dashboard-actions, .row-actions, .pagination-row, .detail-meta, .tag-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-badges {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.hero-badges span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text);
    font-size: 0.92rem;
}
.button {
    display: inline-flex; align-items: center; justify-content: center; padding: 14px 20px; border-radius: 999px;
    font-weight: 600; border: 1px solid transparent;
}
.button-primary { background: linear-gradient(135deg, var(--accent), #ffb86c); color: #08111f; }
.button-secondary { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.14); }
.text-link { color: var(--accent-2); font-weight: 600; }
.project-link { display: inline-block; margin-top: 18px; }
.danger-link { color: var(--danger); }

.glass-panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    border-radius: 28px;
}
.soft-panel {
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    border-color: rgba(255,255,255,0.1);
}
.light-panel {
    background: linear-gradient(180deg, rgba(246,215,191,0.12), rgba(255,255,255,0.03));
}
.warm-panel {
    background: linear-gradient(180deg, rgba(255,122,24,0.09), rgba(255,255,255,0.03));
}
.hero-panel { padding: 28px; display: grid; }
.hero-panel-light {
    background:
        linear-gradient(180deg, rgba(246,215,191,0.1), rgba(53,194,255,0.08)),
        var(--panel);
}
.hero-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero-grid article {
    padding: 22px;
    border-radius: 22px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
}
.hero-grid h2 { font-size: clamp(2rem, 4vw, 3rem); }

.section-grid { padding: 56px 0; }
.airy-section { padding-top: 76px; padding-bottom: 76px; }
.section-soft-wrap {
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.section-heading { max-width: 780px; margin-bottom: 28px; }
.section-heading-wide { max-width: 860px; }
.section-heading h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.compact-gap { padding-top: 28px; }
.service-list, .experience-grid, .category-grid, .project-grid, .dashboard-grid, .gallery-grid {
    display: grid; gap: 24px;
}
.split-showcase, .focus-grid, .timeline-grid, .principles-grid, .cta-panel, .cta-points {
    display: grid;
    gap: 24px;
}
.split-showcase { grid-template-columns: 1fr 1.25fr; align-items: stretch; }
.focus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.principles-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 28px;
    background: linear-gradient(180deg, rgba(246,215,191,0.08), rgba(255,255,255,0.03));
}
.service-item, .info-card, .category-card, .project-card, .prose-card, .gallery-card, .lead-card, .timeline-card, .principle-card { padding: 26px; }
.experience-grid, .category-grid, .project-grid, .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lead-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.lead-card-light {
    background:
        radial-gradient(circle at top left, rgba(246,215,191,0.18), transparent 40%),
        linear-gradient(180deg, rgba(53,194,255,0.09), rgba(255,122,24,0.07)),
        var(--panel);
}
.timeline-card {
    position: relative;
    overflow: hidden;
}
.timeline-card::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: inline-block;
    margin-bottom: 16px;
}
.principle-card p {
    margin: 0;
    color: var(--text);
    font-weight: 500;
}
.cta-panel {
    grid-template-columns: 1.2fr 1fr;
    padding: 32px;
    align-items: start;
}
.cta-panel-light {
    background:
        radial-gradient(circle at top right, rgba(246,215,191,0.2), transparent 35%),
        linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}
.cta-point {
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text);
}
.category-card { position: relative; overflow: hidden; }
.category-card::after {
    content: ''; position: absolute; inset: auto -10% -30% auto; width: 160px; height: 160px;
    background: radial-gradient(circle, var(--accent, var(--accent)) 0%, transparent 70%); opacity: 0.28;
}
.category-card span, .project-topline span, .detail-meta span {
    color: var(--text); font-size: 0.92rem; opacity: 0.8;
}
.project-card { overflow: hidden; padding: 0; }
.project-card-light {
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
}
.project-media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, rgba(255,122,24,0.25), rgba(53,194,255,0.2)); }
.project-media img, .project-media video, .detail-cover img, .detail-cover video, .gallery-card img, .gallery-card video {
    width: 100%; height: 100%; object-fit: cover;
}
.project-content { padding: 24px; }
.media-fallback {
    width: 100%; height: 100%; min-height: 240px; display: grid; place-items: center; font-family: 'Syne', sans-serif;
    font-size: 1.5rem; color: var(--text); background: linear-gradient(135deg, rgba(255,122,24,0.45), rgba(53,194,255,0.32));
}
.media-fallback.large { min-height: 420px; }
.tag-row span, .filter-chip, .accent-chip {
    display: inline-flex; align-items: center; border-radius: 999px; padding: 10px 14px; font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04);
}
.filter-bar { padding: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.filter-chip.active { background: linear-gradient(135deg, rgba(255,122,24,0.3), rgba(53,194,255,0.2)); color: var(--text); }
.page-hero.narrow { max-width: 860px; }
.detail-cover { padding: 18px; overflow: hidden; }
.detail-body { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose-card { min-height: 100%; }
.gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery-card { overflow: hidden; }
.gallery-card figcaption { margin-top: 12px; color: var(--muted); }

.dashboard-actions { justify-content: flex-start; }
.dashboard-grid .glass-panel { padding: 20px; }
.dashboard-list { display: grid; gap: 14px; }
.dashboard-row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dashboard-row:last-child { border-bottom: 0; padding-bottom: 0; }
.accent-chip { width: 24px; height: 24px; padding: 0; }
.message-wrap { margin-top: 18px; }
.message { padding: 14px 18px; border-radius: 16px; background: rgba(140, 240, 181, 0.1); border: 1px solid rgba(140, 240, 181, 0.2); }

.form-shell { max-width: 900px; margin: 24px auto 0; padding: 28px; }
.form-shell.wide { max-width: 1040px; }
.error-shell {
    max-width: 780px;
    margin: 72px auto 0;
    padding: 40px 32px;
    text-align: center;
}
.stack-form p { display: grid; gap: 8px; margin: 0 0 16px; }
.stack-form input, .stack-form textarea, .stack-form select {
    width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.03); color: var(--text); font: inherit;
}
.stack-form input[type='color'] { min-height: 52px; padding: 6px; }
.stack-form input[type='checkbox'] { width: auto; }
.inline-formset { margin-top: 24px; display: grid; gap: 14px; }
.inline-card { padding: 18px; border-radius: 20px; background: rgba(255,255,255,0.03); }

.auth-body { display: grid; place-items: center; padding: 24px; }
.auth-shell { width: min(100%, 560px); }
.auth-card { padding: 28px; }
.empty-state { text-align: center; }
.full-width { grid-column: 1 / -1; }
.pagination-row { justify-content: center; }
.site-footer {
    padding: 36px 0 12px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.site-footer span { opacity: 0.35; }

@media (max-width: 980px) {
    .hero-section, .detail-layout, .detail-body, .service-list, .experience-grid, .category-grid, .project-grid, .dashboard-grid, .gallery-grid, .split-showcase, .focus-grid, .timeline-grid, .principles-grid, .cta-panel {
        grid-template-columns: 1fr;
    }
    .hero-section { min-height: auto; }
    .hero-copy h1, .page-hero h1 { font-size: clamp(2.6rem, 12vw, 4.2rem); max-width: none; }
    .airy-section { padding-top: 52px; padding-bottom: 52px; }
}

@media (max-width: 640px) {
    .site-shell { width: min(100% - 20px, 1180px); }
    .site-header { align-items: flex-start; flex-direction: column; }
    .hero-grid { grid-template-columns: 1fr; }
    .dashboard-row, .stacked-mobile { align-items: flex-start; flex-direction: column; }
    .button, .filter-chip { width: 100%; justify-content: center; }
    .hero-panel, .service-list, .cta-panel { padding: 22px; }
}
