:root {
    --nav-bg: #100916; /* deep near-black purple */
    --primary: #3b1f5a; /* royal purple for headings */
    --accent: #d4af37; /* gold */
    --muted: #8a7b92; /* muted mauve */
    --bg: #faf8fb; /* very light ivory */
    --card-bg: #efe6ff; /* light purple */
    --footer-bg: #080708; /* near black */
    --footer-fg: #efe6c9; /* soft gold */
    --nav-height: 72px;
    --nav-height-shrink: 52px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: #212529;
}

/* Spacer preserves flow when navbar is fixed */
#nav-spacer {
    display: block;
    height: var(--nav-height);
    transition: height 220ms ease;
}

main {
    max-width: 1100px;
    margin: 0 auto;
}

h1,
h2 {
    color: var(--nav-bg);
}

.navbar {
    box-shadow: 0 2px 8px rgba(5, 10, 20, 0.06);
}

/* Fixed top behavior */
.navbar.fixed-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: var(--nav-height);
    transition: height 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.navbar.fixed-top .navbar-brand {
    transition: font-size 220ms ease, transform 220ms ease;
    font-size: 1.25rem;
}

.navbar.fixed-top.navbar-shrink {
    height: var(--nav-height-shrink);
    box-shadow: 0 3px 8px rgba(5, 10, 20, 0.12);
}

.navbar.fixed-top.navbar-shrink .navbar-brand {
    font-size: 1rem;
}

.navbar .navbar-brand {
    color: #fff;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9);
}

.navbar .nav-link:hover {
    color: #fff;
    text-decoration: underline;
}

.hero {
    background: linear-gradient(135deg, rgba(11, 35, 64, 0.95) 0%, rgba(31, 111, 139, 0.9) 100%);
    color: #fff;
}

.hero .display-4 {
    color: #fff;
}

.hero .text-muted {
    color: #ffffff;
}

.hero .lead {
    color: #ffffff;
}

.hero-portrait {
    width: 100%;
    height: 420px; /* larger photo area */
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(0,0,0,0.06);
    background-image: url('/images/hero-person.svg');
    background-size: cover;
    background-position: center;
}

.card {
    border: 1px solid rgba(59,31,90,0.08);
    background: var(--card-bg);
}

.card .card-title {
    color: var(--primary);
    font-weight: 600;
}

section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

footer {
    font-size: 0.95rem;
}

/* Buttons */
.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Gold CTAs */
.btn-success {
    background-color: var(--accent) !important;
    border-color: rgba(0,0,0,0.08) !important;
    color: #0b0710 !important;
}
.btn-success:hover {
    background-color: #c49a2f !important;
}

.section-icon {
    color: var(--primary);
    margin-right: 0.5rem;
}

/* Small screens adjustments */
@media (max-width:767px) {
    .hero-portrait {
        height: 180px;
        margin-top: 1rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    :root {
        --nav-height: 56px;
        --nav-height-shrink: 48px;
    }

    /* Mobile navbar: make collapse menu overlay directly below navbar with solid background */
    .navbar.fixed-top {
        padding: 0.4rem 1rem;
    }

    .navbar.fixed-top .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(180deg, rgba(11, 34, 56, 0.98), rgba(11, 34, 56, 0.98));
        padding: 0.75rem 1rem;
        box-shadow: 0 8px 20px rgba(5, 10, 20, 0.18);
        border-top: 1px solid rgba(255, 255, 255, 0.04);
        z-index: 1040;
    }

    .navbar.fixed-top .navbar-collapse .navbar-nav {
        flex-direction: column;
        gap: 0.25rem;
    }

    .navbar.fixed-top .nav-link {
        color: #ffffff !important;
        padding: 0.5rem 0;
        white-space: normal;
        word-break: break-word;
    }

    .navbar.fixed-top .navbar-brand {
        font-size: 1rem;
        white-space: normal;
        overflow-wrap: break-word;
    }

    .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.18);
    }
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-fg);
}

a {
    color: var(--accent);
}

a:hover {
    color: darken(var(--accent), 10%);
}

/* Accessibility: focus states */
a:focus,
button:focus,
.nav-link:focus {
    outline: 3px solid rgba(31, 111, 139, 0.18);
    outline-offset: 2px;
}

/* Utility */
.lead {
    color: var(--muted);
}