:root {
    --navy: #032f5f;
    --navy-dark: #021f41;
    --red: #d82b25;
    --red-dark: #b9201b;
    --ink: #142235;
    --muted: #647184;
    --line: #dce3eb;
    --surface: #f5f7fa;
    --white: #ffffff;
    --success: #16845b;
    --shadow: 0 18px 55px rgba(3, 47, 95, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: "Poppins", Arial, sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }
.container { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
.skip-link {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    transform: translateY(-150%);
    padding: 10px 16px;
    border-radius: 6px;
    color: var(--white);
    background: var(--navy);
}
.skip-link:focus { transform: translateY(0); }

.topbar { color: #dfe8f1; background: var(--navy-dark); font-size: 12px; }
.topbar-inner { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.topbar a { color: var(--white); text-decoration: none; }
.navbar { position: relative; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; }
.brand img { width: 168px; max-height: 58px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
    position: relative;
    color: #25364a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -8px;
    height: 2px;
    background: var(--red);
    transition: right .2s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--red); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 7px; background: var(--surface); cursor: pointer; }
.menu-toggle span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; background: var(--navy); }

.hero, .role-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(120deg, rgba(2,31,65,.98), rgba(3,47,95,.91));
}
.hero::after, .role-hero::after {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    right: -180px;
    top: -300px;
    border: 80px solid rgba(255,255,255,.05);
    border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; padding: 100px 0 105px; }
.hero h1, .role-hero h1 { max-width: 780px; margin: 9px 0 18px; font-size: clamp(38px, 5vw, 66px); line-height: 1.08; letter-spacing: -.04em; }
.hero p { max-width: 720px; margin: 0; color: #d9e3ee; font-size: 18px; }
.eyebrow { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow, .role-hero .job-badge { color: #ff8882; }

.section { padding: 88px 0 100px; }
.section-heading { max-width: 680px; margin-bottom: 36px; }
.section-heading h2, .role-details h2, .application-heading h2 { margin: 6px 0 8px; color: var(--navy-dark); font-size: clamp(28px, 3vw, 40px); line-height: 1.2; }
.section-heading p, .application-heading p { margin: 0; color: var(--muted); }
.job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.job-card {
    display: flex;
    min-height: 390px;
    flex-direction: column;
    padding: 34px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--navy);
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}
.job-card:hover { transform: translateY(-4px); box-shadow: 0 24px 65px rgba(3,47,95,.15); }
.job-badge { display: inline-block; color: var(--red); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.job-card h3 { margin: 10px 0 12px; color: var(--navy-dark); font-size: 28px; line-height: 1.25; }
.job-card p { margin: 0; color: var(--muted); }
.job-meta { margin: 26px 0 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.job-meta div { display: grid; grid-template-columns: 105px 1fr; gap: 14px; margin: 8px 0; }
.job-meta dt { color: var(--muted); font-size: 13px; }
.job-meta dd { margin: 0; color: var(--navy-dark); font-weight: 600; }
.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px 22px;
    border: 1px solid var(--red);
    border-radius: 7px;
    color: var(--white);
    background: var(--red);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.button:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-1px); }

.role-hero .container { position: relative; z-index: 1; padding-top: 66px; padding-bottom: 70px; }
.role-hero h1 { font-size: clamp(36px, 5vw, 58px); }
.back-link { display: block; width: max-content; margin-bottom: 30px; color: #d9e3ee; font-size: 13px; text-decoration: none; }
.back-link:hover { color: var(--white); }
.role-meta { display: flex; flex-wrap: wrap; gap: 18px 36px; color: #d9e3ee; }
.role-meta strong { color: var(--white); }
.role-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(520px, 1.15fr); gap: 64px; align-items: start; }
.role-details { padding-top: 8px; }
.role-details h2 { margin-top: 0; font-size: 29px; }
.role-details h2:not(:first-child) { margin-top: 42px; }
.role-details > p { color: var(--muted); }
.qualification-list { margin: 18px 0 0; padding: 0; list-style: none; }
.qualification-list li { position: relative; margin: 0; padding: 0 0 20px 28px; color: #435164; }
.qualification-list li::before { content: ""; position: absolute; top: 10px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(216,43,37,.10); }
.qualification-list strong { color: var(--navy-dark); }
.notice-card { margin-top: 24px; padding: 22px; border-left: 4px solid var(--navy); border-radius: 7px; background: var(--surface); }
.notice-card p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.application-card { padding: 34px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); }
.application-heading { margin-bottom: 25px; }
.application-heading h2 { font-size: 29px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field, .checkbox-field { margin-bottom: 18px; }
.field label, .label-row label { display: block; margin-bottom: 7px; color: var(--navy-dark); font-size: 13px; font-weight: 600; }
.field label span, .checkbox-field label span { color: var(--red); }
.field label small { color: var(--muted); font-weight: 400; }
.field input:not([type="file"]), .field textarea {
    width: 100%;
    border: 1px solid #cfd8e2;
    border-radius: 7px;
    padding: 12px 13px;
    color: var(--ink);
    background: var(--white);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 155px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(3,47,95,.10); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.label-row small, .field-help { color: var(--muted); font-size: 11px; }
.file-input { display: flex !important; min-height: 76px; align-items: center; justify-content: center; flex-direction: column; margin: 0 !important; padding: 12px; border: 1px dashed #9aabba; border-radius: 7px; background: var(--surface); cursor: pointer; text-align: center; }
.file-input:hover { border-color: var(--navy); }
.file-input strong { color: var(--navy); }
.file-input span { color: var(--muted) !important; font-size: 11px; font-weight: 400; }
.checkbox-field { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; }
.checkbox-field input { width: 17px; height: 17px; margin-top: 4px; accent-color: var(--red); }
.checkbox-field label { color: #435164; font-size: 12px; }
.checkbox-field .field-error { grid-column: 2; }
.field-error { display: block; margin-top: 5px; color: #b31d17; font-size: 11px; }
.form-alert { margin-bottom: 20px; padding: 14px 16px; border: 1px solid #efc6c3; border-radius: 7px; color: #8c1d18; background: #fff4f3; font-size: 13px; }
.form-alert p { margin: 0; }
.submit-button { width: 100%; margin-top: 4px; border: 0; }
.submit-button[disabled] { cursor: wait; opacity: .8; transform: none; }
.spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.45); border-top-color: var(--white); border-radius: 50%; animation: spin .75s linear infinite; }
.submit-button.is-loading .spinner { display: inline-block; }
.form-footnote { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-section { min-height: 66vh; padding: 90px 0; background: var(--surface); }
.success-card { max-width: 650px; margin: 0 auto; padding: 50px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); text-align: center; }
.success-icon { display: grid; width: 68px; height: 68px; place-items: center; margin: 0 auto 22px; border-radius: 50%; color: var(--white); background: var(--success); font-size: 34px; font-weight: 700; }
.success-card h1 { margin: 7px 0 13px; color: var(--navy-dark); font-size: clamp(31px, 4vw, 43px); line-height: 1.2; }
.success-card > p { color: var(--muted); }
.reference-box { margin: 28px 0 20px; padding: 18px; border: 1px dashed #98a9ba; border-radius: 8px; background: var(--surface); }
.reference-box span { display: block; color: var(--muted); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.reference-box strong { display: block; margin-top: 4px; color: var(--navy); font-size: 24px; letter-spacing: .08em; }
.success-card .button { margin-top: 16px; }
.muted { font-size: 13px; }

.site-footer { padding: 58px 0 20px; color: #cbd6e3; background: var(--navy-dark); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.footer-logo { width: 170px; max-height: 62px; object-fit: contain; filter: brightness(0) invert(1); }
.site-footer p { max-width: 510px; color: #aebdd0; font-size: 13px; }
.site-footer h2 { margin: 0 0 10px; color: var(--white); font-size: 18px; }
.site-footer a { color: var(--white); text-decoration: none; }
.footer-bottom { margin-top: 42px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #8294a9; font-size: 11px; }
.empty-state { grid-column: 1 / -1; padding: 50px; border-radius: 10px; background: var(--surface); text-align: center; }

@media (max-width: 980px) {
    .topbar { display: none; }
    .menu-toggle { display: block; }
    .nav-links { display: none; position: absolute; top: 82px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 20px 20px; border-bottom: 1px solid var(--line); background: var(--white); box-shadow: 0 16px 30px rgba(3,47,95,.09); }
    .nav-links.is-open { display: flex; }
    .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }
    .nav-links a::after { display: none; }
    .role-layout { grid-template-columns: 1fr; gap: 45px; }
    .role-details { max-width: 760px; }
}

@media (max-width: 720px) {
    .container { width: min(100% - 28px, 1160px); }
    .nav-inner { min-height: 72px; }
    .brand img { width: 145px; }
    .nav-links { top: 72px; }
    .hero-content { padding: 75px 0 80px; }
    .hero h1 { font-size: 40px; }
    .hero p { font-size: 15px; }
    .section { padding: 62px 0 72px; }
    .job-grid, .footer-grid { grid-template-columns: 1fr; }
    .job-card { min-height: 0; padding: 27px; }
    .role-hero .container { padding-top: 45px; padding-bottom: 48px; }
    .role-meta { flex-direction: column; gap: 6px; }
    .role-layout { gap: 34px; }
    .application-card { padding: 24px 18px; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .success-card { padding: 36px 22px; }
    .footer-grid { gap: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
