:root {
    color-scheme: light;
    --bg: #f4efe7;
    --surface: rgba(255, 252, 247, 0.94);
    --surface-strong: #fffaf2;
    --ink: #1f2230;
    --muted: #626575;
    --line: rgba(31, 34, 48, 0.12);
    --brand: #0f7b6c;
    --brand-deep: #0a564d;
    --accent: #d86b37;
    --danger: #a23636;
    --shadow: 0 24px 60px rgba(31, 34, 48, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --font-ui: "Aptos", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-ui);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(216, 107, 55, 0.16), transparent 32%),
        radial-gradient(circle at top right, rgba(15, 123, 108, 0.14), transparent 28%),
        linear-gradient(180deg, #fbf6ef 0%, #efe5d8 100%);
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

.skip-link,
.sr-only {
    position: absolute;
}

.skip-link {
    left: 1rem;
    top: 1rem;
    z-index: 50;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: var(--ink);
    color: white;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.sr-only {
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1.2fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem clamp(1rem, 3vw, 2rem);
    backdrop-filter: blur(18px);
    background: rgba(251, 246, 239, 0.85);
    border-bottom: 1px solid rgba(31, 34, 48, 0.08);
}

.brand-block {
    display: grid;
    gap: 0.25rem;
}

.brand {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.site-nav a {
    padding: 0.8rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
    background: rgba(15, 123, 108, 0.12);
    color: var(--brand-deep);
    transform: translateY(-1px);
}

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

.hero,
.panel {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow);
}

.hero {
    padding: clamp(1.4rem, 3vw, 2.4rem);
    border-radius: var(--radius-xl);
}

.hero h1 {
    margin: 0.4rem 0 0.8rem;
    max-width: 12ch;
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    line-height: 0.98;
}

.hero-copy {
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.eyebrow,
.section-kicker {
    margin: 0;
    color: var(--brand-deep);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stats-grid,
.auth-grid,
.section-stack,
.profile-layout,
.status-grid {
    display: grid;
    gap: 1rem;
}

.stats-grid {
    margin-top: 1.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.auth-grid,
.profile-layout {
    margin-top: 1.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-grid {
    margin-top: 1.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.section-stack {
    margin-top: 1.5rem;
}

.panel {
    padding: 1.4rem;
    border-radius: var(--radius-lg);
}

.panel-note {
    margin-top: 1.5rem;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.section-head h2,
.section-head h3 {
    margin: 0.15rem 0 0;
    font-size: 1.4rem;
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.stat-card,
.status-card,
.list-card,
.profile-card {
    padding: 1.2rem;
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1px solid var(--line);
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-value {
    display: block;
    margin-top: 0.65rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.stat-copy,
.helper,
.muted {
    color: var(--muted);
}

.jobs-carousel {
    margin-top: 1.5rem;
}

.carousel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.carousel-track {
    display: flex;
    transition: transform 0.55s ease;
}

.carousel-card {
    min-width: 100%;
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
}

.carousel-card h3 {
    margin: 0;
    font-size: 1.35rem;
}

.form-stack {
    display: grid;
    gap: 0.95rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field span,
.label-row span {
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(31, 34, 48, 0.12);
    border-radius: var(--radius-md);
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
    min-height: 8rem;
    resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.button:focus-visible,
.site-nav a:focus-visible {
    outline: none;
    border-color: rgba(15, 123, 108, 0.7);
    box-shadow: 0 0 0 4px rgba(15, 123, 108, 0.14);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand) 0%, #13a086 100%);
    color: white;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(15, 123, 108, 0.18);
    transition: background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.button:hover {
    background: linear-gradient(135deg, var(--brand-deep) 0%, #0f7b6c 100%);
    box-shadow: 0 14px 28px rgba(15, 123, 108, 0.24);
    transform: translateY(-1px);
}

.button:active {
    background: linear-gradient(135deg, #073f39 0%, var(--brand-deep) 100%);
    box-shadow: inset 0 3px 8px rgba(31, 34, 48, 0.25);
    transform: translateY(1px);
}

.button-secondary {
    background: rgba(31, 34, 48, 0.08);
    color: var(--ink);
    box-shadow: none;
}

.button-secondary:hover {
    background: rgba(15, 123, 108, 0.16);
    color: var(--brand-deep);
}

.button-secondary:active {
    background: rgba(15, 123, 108, 0.24);
    color: var(--brand-deep);
}

.button-warning {
    background: linear-gradient(135deg, #d86b37 0%, #f08d3e 100%);
    box-shadow: 0 10px 22px rgba(216, 107, 55, 0.2);
}

.button-warning:hover {
    background: linear-gradient(135deg, #bd5628 0%, #d86b37 100%);
    box-shadow: 0 14px 28px rgba(216, 107, 55, 0.28);
}

.button-warning:active {
    background: linear-gradient(135deg, #93411f 0%, #bd5628 100%);
}

.button-danger {
    background: linear-gradient(135deg, #943535 0%, #c64545 100%);
    box-shadow: 0 10px 22px rgba(148, 53, 53, 0.2);
}

.button-danger:hover {
    background: linear-gradient(135deg, #7a2929 0%, #a23636 100%);
    box-shadow: 0 14px 28px rgba(148, 53, 53, 0.28);
}

.button-danger:active {
    background: linear-gradient(135deg, #5d1f1f 0%, #7a2929 100%);
}

.button-small {
    min-height: 2.6rem;
    padding-inline: 0.95rem;
    font-size: 0.92rem;
}

.filter-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 2fr 1fr;
}

.list-stack {
    display: grid;
    gap: 1rem;
}

.list-card h3,
.profile-card h2,
.status-card h3 {
    margin: 0 0 0.6rem;
}

.list-card p,
.profile-card p,
.status-card p,
.panel p {
    line-height: 1.6;
}

.meta,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.contact-list {
    display: grid;
    gap: 0.75rem;
    margin: 0.85rem 0 0;
}

.contact-list div {
    display: grid;
    gap: 0.2rem;
}

.contact-list dt {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contact-list dd {
    margin: 0;
    font-weight: 700;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 123, 108, 0.1);
    color: var(--brand-deep);
    font-size: 0.92rem;
    font-weight: 700;
}

.status-value {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.65rem;
    font-weight: 800;
}

.status-card p {
    margin: 0;
    color: var(--muted);
}

.hidden {
    display: none !important;
}

@media (max-width: 980px) {
    .site-header {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .site-nav {
        justify-content: flex-start;
    }

    .auth-grid,
    .profile-layout,
    .status-grid,
    .stats-grid,
    .stats-grid-home,
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 1rem, 100%);
        padding-top: 1rem;
    }

    .hero h1 {
        max-width: none;
    }

    .panel,
    .hero,
    .stat-card,
    .status-card,
    .list-card,
    .profile-card {
        padding: 1rem;
        border-radius: 18px;
    }

    .button,
    .site-nav a {
        width: 100%;
    }

    .section-head,
    .section-actions,
    .action-row {
        align-items: stretch;
    }

    .section-actions,
    .action-row {
        flex-direction: column;
    }
}
