:root {
    --bg: #2f2f2f;
    --surface: #242424;
    --surface-2: #1f1f1f;
    --surface-3: #151515;
    --surface-4: #111111;
    --border: #3d3d3d;
    --border-strong: #474747;
    --text: #ffffff;
    --muted: #d7d7d7;
    --muted-2: #cccccc;
    --accent: #ffd54f;
    --accent-soft: rgba(255, 213, 79, 0.12);
    --max-width: 1100px;
    --radius: 12px;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    --shadow-soft: 0 8px 22px rgba(0, 0, 0, 0.14);
    --font-body: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    font-family: var(--font-body);
    letter-spacing: 0.01em;
}

a {
    color: var(--muted-2);
    text-decoration: none;
}

a:hover {
    color: var(--text);
}

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

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

h1,
h2,
h3,
h4 {
    line-height: 1.18;
    margin-top: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.25rem, 4vw, 3.2rem);
    margin-bottom: 0.45em;
}

h2 {
    font-size: clamp(1.45rem, 2vw, 2rem);
    margin-bottom: 0.55em;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 0.55em;
}

h4 {
    font-size: 1rem;
    margin-bottom: 0.65em;
}

p,
ul {
    margin-top: 0;
    margin-bottom: 1rem;
}

main {
    display: block;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 10px;
    background: #ffffff;
    color: #000000;
    padding: 8px 12px;
    z-index: 1000;
}

.skip-link:focus {
    top: 10px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -16px;
    margin-right: -16px;
}

[class^="col-"],
[class*=" col-"] {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
}

.col-md-4 {
    width: 33.3333%;
}

.col-md-5 {
    width: 41.6667%;
}

.col-md-6 {
    width: 50%;
}

.col-md-7 {
    width: 58.3333%;
}

.col-md-8 {
    width: 66.6667%;
}

.text-center {
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.8rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--accent);
    color: #171717;
}

.btn-primary:hover,
.btn-primary:focus {
    color: #171717;
    background-color: #ffe27a;
}

.btn-default {
    background-color: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}

.btn-default:hover,
.btn-default:focus {
    color: var(--text);
    background-color: var(--surface-3);
}

.btn-disabled,
.btn:disabled {
    opacity: 0.68;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.btn-disabled:hover,
.btn-disabled:focus,
.btn:disabled:hover,
.btn:disabled:focus {
    color: inherit;
    background-color: inherit;
    transform: none;
}

.form-group {
    margin-bottom: 0;
}

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background-color: #121212;
    color: var(--text);
    font: inherit;
}

.form-control::placeholder {
    color: #9d9d9d;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 213, 79, 0.2);
}

textarea.form-control {
    resize: vertical;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 30;
    margin-bottom: 0;
    background-color: var(--surface-4);
    border-bottom: 1px solid #202020;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(10px);
}

.navbar-inverse {
    background-color: var(--surface-4);
}

.navbar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.navbar-brand {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.navbar-brand:hover,
.navbar-brand:focus {
    color: var(--accent);
}

.navbar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: transparent;
}

.navbar-toggle .icon-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text);
    border-radius: 999px;
}

.navbar-collapse {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex: 1 1 100%;
}

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-right {
    margin-left: auto;
}

.nav > li {
    position: relative;
}

.nav > li > a,
.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    color: var(--text);
    font-weight: 600;
    border: 0;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav > li > a:hover,
.nav > li > a:focus,
.dropdown-toggle:hover,
.dropdown-toggle:focus,
.nav > .active > a,
.nav > .active > .dropdown-toggle {
    color: var(--accent);
    background-color: var(--accent-soft);
}

.dropdown-toggle[aria-expanded="true"] {
    color: var(--accent);
}

.caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 8px;
    list-style: none;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    background-color: #1a1a1a;
    box-shadow: var(--shadow);
    display: none;
}

.dropdown-menu > li > a {
    display: block;
    padding: 0.7rem 0.85rem;
    color: var(--text);
    border-radius: 10px;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: var(--accent-soft);
    color: var(--accent);
}

.dropdown.open > .dropdown-menu {
    display: block;
}

.divider {
    height: 1px;
    margin: 8px 4px;
    background-color: var(--border);
}

.footer {
    background-color: var(--surface-2);
    color: var(--text);
    padding: 40px 0;
    margin-top: 60px;
    border-top: 1px solid #2c2c2c;
}

.footer h4 {
    margin-bottom: 15px;
}

.footer p,
.footer a {
    color: var(--muted-2);
}

.footer a:hover,
.footer a:focus {
    color: var(--text);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin-bottom: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.page-section {
    padding: 60px 0;
}

.page-section-tight {
    padding: 40px 0;
}

.page-intro {
    font-size: 1.05rem;
    color: #ececec;
    margin-bottom: 30px;
    max-width: 68ch;
    line-height: 1.75;
}

.hero-title,
.page-title {
    max-width: 14ch;
}

.hero-subtitle,
.research-intro {
    font-size: 1.05rem;
    color: #e3e3e3;
    line-height: 1.75;
    max-width: 72ch;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.surface-card {
    background: linear-gradient(180deg, rgba(52, 52, 52, 0.95) 0%, rgba(36, 36, 36, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.surface-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 213, 79, 0.22);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.content-card {
    padding: 28px;
}

.content-card h2,
.content-card h3 {
    margin-top: 0;
    margin-bottom: 14px;
}

.content-card p:last-child,
.content-card ul:last-child {
    margin-bottom: 0;
}

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

.footer hr {
    border: 0;
    border-top: 1px solid #444444;
    margin: 20px 0;
}

@media (max-width: 900px) {
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-7,
    .col-md-8 {
        width: 100%;
    }
}

@media (max-width: 767px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.55rem;
        line-height: 1.3;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .navbar .container {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .navbar-header {
        width: 100%;
        padding-bottom: 0;
    }

    .navbar-toggle {
        display: inline-flex;
    }

    .navbar-collapse {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        border-top: 1px solid #2b2b2b;
        padding-top: 12px;
    }

    .navbar-collapse.is-open {
        display: flex;
    }

    .navbar-brand {
        max-width: 80%;
        line-height: 1.25;
    }

    .nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .navbar-right {
        margin-left: 0;
    }

    .nav > li > a,
    .dropdown-toggle,
    .dropdown-menu > li > a {
        width: 100%;
        justify-content: space-between;
        padding-top: 12px;
        padding-bottom: 12px;
        border-radius: 10px;
    }

    .dropdown-menu {
        position: static;
        min-width: 0;
        width: 100%;
        margin-top: 4px;
        box-shadow: none;
        border: 0;
        background-color: var(--surface-3);
    }

    .footer {
        padding: 30px 0;
        margin-top: 40px;
    }

    .footer .col-md-4 {
        margin-bottom: 25px;
    }

    .btn {
        width: 100%;
    }

    .button-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .page-section {
        padding: 35px 0;
    }

    .page-section-tight {
        padding: 24px 0;
    }

    .page-intro {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .content-card {
        padding: 20px;
    }
}
