:root {
  --ink: #0B1F3A;
  --ink-soft: #16294a;
  --slate: #1C2530;
  --slate-soft: #5b6472;
  --paper: #F7F8FA;
  --paper-raised: #FFFFFF;
  --brass: #A6192E;
  --brass-dark: #7A0F21;
  --hairline: #E1E4E9;
  --live-green: #2F7D5D;

  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: var(--font-body);
  line-height: 1.55;
}

a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); background: var(--paper-raised); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; overflow: hidden; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-word { font-weight: 600; font-size: 18px; }
.main-nav { display: flex; gap: 28px; }
.main-nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--slate-soft); }
.main-nav a:hover { color: var(--ink); }

/* Hero */
.hero { background: var(--ink); color: var(--paper); padding: 64px 0 48px; overflow: hidden; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.hero-copy { max-width: 560px; flex-shrink: 0; }
.hero-illustration { width: 220px; height: 220px; flex-shrink: 0; opacity: 0.9; }
.hero-illustration svg { width: 100%; height: 100%; }
.hero-title { font-weight: 600; font-size: 44px; line-height: 1.15; margin-bottom: 14px; }
.hero-sub { font-size: 16px; color: #C7D0DF; margin: 0 0 32px; }

.search-bar { display: flex; background: var(--paper-raised); border-radius: 6px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.16); }
.search-bar input, .search-bar select { border: none; padding: 14px 16px; font-size: 14px; font-family: var(--font-body); color: var(--slate); background: transparent; border-right: 1px solid var(--hairline); }
.search-bar input { flex: 1; min-width: 0; }
.search-bar button { border: none; background: var(--brass); color: var(--ink); font-weight: 600; font-size: 14px; padding: 14px 24px; cursor: pointer; }
.search-bar button:hover { background: var(--brass-dark); color: var(--paper); }
.search-bar input:focus, .search-bar select:focus, .search-bar button:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }

/* Section shared */
.section-title { font-size: 22px; font-weight: 600; color: var(--ink); }
.tiles-section, .browse-section, .about-section { padding: 48px 0; }
.tiles-section { border-bottom: 1px solid var(--hairline); }
.section-header-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.text-link { background: none; border: none; color: var(--brass-dark); font-weight: 600; font-size: 14px; cursor: pointer; }
.text-link:hover { text-decoration: underline; }
.updated-note { font-size: 13px; color: var(--slate-soft); }

/* Tiles */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 20px; }
.tile {
  display: block; text-align: left; background: var(--paper-raised); border: 1px solid var(--hairline);
  border-radius: 8px; padding: 18px; cursor: pointer; transition: border-color .15s ease, transform .15s ease;
}
.tile:hover { border-color: var(--brass); transform: translateY(-2px); }
.tile-name { font-weight: 600; font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.tile-count { font-size: 13px; color: var(--slate-soft); }
.tile-featured { border-color: var(--brass); background: linear-gradient(135deg, #fff, #FBEEF0); }

/* Job lists (shared by recent preview + full feed) */
.job-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

.job-card { background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: 8px; padding: 16px 18px; cursor: pointer; transition: border-color .15s ease, transform .15s ease; animation: cardIn .35s ease-out backwards; }
@keyframes cardIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .job-card { animation: none; } }
.job-card:hover { border-color: var(--brass); transform: translateY(-1px); }
.job-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.job-title { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0 0 3px; }
.job-company { font-size: 13.5px; color: var(--slate-soft); margin: 0; }
.job-tag { font-size: 10.5px; font-weight: 600; letter-spacing: .4px; color: var(--live-green); border: 1px solid var(--live-green); border-radius: 3px; padding: 3px 8px; white-space: nowrap; flex-shrink: 0; }
.job-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12.5px; color: var(--slate-soft); }
.job-meta span::before { content: "· "; color: var(--hairline); }
.job-meta span:first-child::before { content: ""; }

/* Filters / browse layout */
.feed-layout { display: grid; grid-template-columns: 200px 1fr; gap: 36px; }
.filters-heading { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--slate-soft); margin-bottom: 18px; }
.filter-group { margin-bottom: 24px; }
.filter-group h4 { font-size: 11.5px; font-weight: 700; color: var(--slate-soft); margin-bottom: 8px; }
.filter-list { list-style: none; margin: 0; padding: 0; }
.filter-list li { margin-bottom: 5px; }
.filter-list button { background: none; border: none; padding: 3px 0; font-size: 13px; color: var(--slate); cursor: pointer; text-align: left; font-family: var(--font-body); }
.filter-list button:hover { color: var(--ink); text-decoration: underline; }
.filter-list button.active { color: var(--brass-dark); font-weight: 600; }
.feed-count { font-size: 13.5px; color: var(--slate-soft); margin: 0 0 16px; }
.empty-state { color: var(--slate-soft); font-size: 14px; padding: 40px 0; text-align: center; }

.skeleton-card { background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: 8px; padding: 16px 18px; }
.skeleton-line { height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--hairline) 25%, #EEF0F3 50%, var(--hairline) 75%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; }
.skeleton-line.title { width: 55%; height: 15px; margin-bottom: 8px; }
.skeleton-line.sub { width: 35%; margin-bottom: 12px; }
.skeleton-line.meta { width: 45%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton-line { animation: none; } }

/* About / How it works */
.about-section { border-top: 1px solid var(--hairline); }
.about-intro { font-size: 16px; color: var(--slate-soft); max-width: 620px; margin: 10px 0 40px; line-height: 1.6; }

.how-timeline { max-width: 720px; position: relative; padding-left: 64px; }
.how-step { position: relative; padding-bottom: 40px; }
.how-step:last-child { padding-bottom: 0; }
.how-step:not(:last-child)::after {
  content: ""; position: absolute; left: -46px; top: 40px; bottom: -4px; width: 1px; background: var(--hairline);
}
.how-step-number {
  position: absolute; left: -64px; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-family: var(--font-display); font-weight: 700;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.how-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.how-step-icon { width: 22px; height: 22px; color: var(--brass); flex-shrink: 0; }
.how-step-icon svg { width: 100%; height: 100%; }
.how-step h3 { font-size: 17px; font-weight: 600; color: var(--ink); margin: 0; }
.how-step p { font-size: 14.5px; color: var(--slate-soft); line-height: 1.7; margin: 0; }

@media (max-width: 640px) {
  .how-timeline { padding-left: 44px; }
  .how-step-number { left: -44px; width: 28px; height: 28px; font-size: 13px; }
  .how-step:not(:last-child)::after { left: -30px; }
}

/* Job detail modal */
.job-modal-backdrop { position: fixed; inset: 0; background: rgba(11,31,58,0.55); display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px; z-index: 100; overflow-y: auto; }
.job-modal-backdrop[hidden] { display: none; }
.job-modal { background: var(--paper-raised); border-radius: 10px; max-width: 640px; width: 100%; padding: 36px; position: relative; }
.job-modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--slate-soft); }
.job-modal-close:hover { color: var(--ink); }
.modal-title { font-size: 24px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.modal-company { font-size: 15px; color: var(--slate-soft); margin-bottom: 16px; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--slate-soft); margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--hairline); }
.modal-description { font-size: 14.5px; color: var(--slate); line-height: 1.7; margin-bottom: 24px; white-space: pre-line; }
.modal-apply { display: inline-block; background: var(--brass); color: var(--ink); font-weight: 600; padding: 13px 28px; border-radius: 6px; text-decoration: none; font-size: 14.5px; border: none; cursor: pointer; width: 100%; }
.modal-apply:hover { background: var(--brass-dark); color: var(--paper); }
.modal-source-note { font-size: 12.5px; color: var(--slate-soft); margin-top: 14px; }
.modal-source-note a { color: var(--brass-dark); font-weight: 600; text-decoration: none; }
.modal-source-note a:hover { text-decoration: underline; }

.consult-block { border-top: 1px solid var(--hairline); padding-top: 20px; }
.consult-heading { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.consult-sub { font-size: 13.5px; color: var(--slate-soft); margin: 0 0 16px; }
.consult-section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--slate-soft); margin: 4px 0 10px; }
.consult-form { display: flex; flex-direction: column; gap: 14px; }
.consult-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--slate); }
.consult-optional { font-size: 12px; font-weight: 400; color: var(--slate-soft); }
.consult-form input, .consult-form select, .consult-form textarea {
  border: 1px solid var(--hairline); border-radius: 6px; padding: 11px 13px; font-size: 14px;
  font-family: var(--font-body); color: var(--slate); background: var(--paper); resize: vertical; font-weight: 400;
}
.consult-form input[type="file"] { padding: 8px; font-size: 13px; }
.consult-form input:focus, .consult-form select:focus, .consult-form textarea:focus { outline: 2px solid var(--brass); outline-offset: -1px; border-color: var(--brass); }
.consult-row { display: flex; gap: 10px; }
.consult-row input { flex: 1; min-width: 0; }
.consult-success { font-size: 14px; color: var(--live-green); background: #EAF5F0; border-radius: 6px; padding: 14px 16px; margin: 0; }
.consult-error { font-size: 13.5px; color: #A13B3B; margin: 8px 0 0; }
.consult-consent { font-size: 11.5px; color: var(--slate-soft); text-align: center; margin: 6px 0 0; }
.consult-consent a { color: var(--slate-soft); text-decoration: underline; }

/* Browse page (jobs.html) */
.browse-hero { background: var(--ink); padding: 32px 0; }
.back-link { display: inline-block; color: #C7D0DF; font-size: 13.5px; text-decoration: none; margin-bottom: 16px; }
.back-link:hover { color: var(--paper); }
.browse-hero .search-bar { max-width: 900px; }

.exec-filter-btn {
  display: block; width: 100%; text-align: left; font-family: var(--font-body);
  border: 1px solid var(--brass); background: linear-gradient(135deg, #fff, #FBEEF0);
  border-radius: 8px; padding: 14px 16px; cursor: pointer; margin-bottom: 24px;
}
.exec-filter-btn:hover { transform: translateY(-1px); }
.exec-filter-btn.active { background: var(--brass); }
.exec-filter-btn.active .tile-name { color: var(--ink); }
.exec-filter-btn .tile-name { font-weight: 600; font-size: 14px; color: var(--ink); }

.browse-section { padding: 40px 0 72px; }

.feed-header-controls { display: flex; align-items: center; gap: 16px; }
.sort-label { font-size: 13px; color: var(--slate-soft); display: flex; align-items: center; gap: 6px; }
.sort-label select { border: 1px solid var(--hairline); border-radius: 5px; padding: 5px 8px; font-size: 13px; font-family: var(--font-body); color: var(--slate); background: var(--paper-raised); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; }
.pagination button { border: 1px solid var(--hairline); background: var(--paper-raised); border-radius: 6px; padding: 8px 16px; font-size: 13.5px; font-weight: 600; color: var(--slate); cursor: pointer; font-family: var(--font-body); }
.pagination button:hover:not(:disabled) { border-color: var(--brass); color: var(--brass-dark); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-status { font-size: 13px; color: var(--slate-soft); }

.alerts-block { margin-top: 56px; padding: 32px; background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: 10px; text-align: center; }
.alerts-block h3 { font-size: 19px; color: var(--ink); margin-bottom: 6px; }
.alerts-block p { font-size: 14px; color: var(--slate-soft); margin: 0 0 20px; }
.alerts-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.alerts-form input[type="email"] { flex: 1; border: 1px solid var(--hairline); border-radius: 6px; padding: 11px 14px; font-size: 14px; font-family: var(--font-body); }
.alerts-form input[type="email"]:focus { outline: 2px solid var(--brass); outline-offset: -1px; border-color: var(--brass); }
.alerts-form button { background: var(--brass); color: var(--ink); border: none; border-radius: 6px; padding: 11px 22px; font-weight: 600; font-size: 14px; cursor: pointer; }
.alerts-form button:hover { background: var(--brass-dark); color: var(--paper); }
.alerts-success { font-size: 14px; color: var(--live-green); background: #EAF5F0; border-radius: 6px; padding: 12px 16px; max-width: 420px; margin: 0 auto; }
.alerts-error { font-size: 13.5px; color: #A13B3B; margin-top: 10px; }

@media (max-width: 640px) {
  .feed-header-controls { flex-wrap: wrap; }
  .alerts-form { flex-direction: column; }
}

/* Tile as link (homepage uses <a>, browse sidebar uses <button> for exec toggle) */
a.tile { text-decoration: none; }
.site-footer { border-top: 1px solid var(--hairline); padding: 24px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.site-footer p { font-size: 13px; color: var(--slate-soft); margin: 0; }
.site-footer a { font-size: 13px; color: var(--slate-soft); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Legal pages */
.legal-page { max-width: 720px; padding: 48px 24px 72px; }
.legal-page h1 { font-size: 32px; margin-bottom: 6px; }
.legal-updated { font-size: 13px; color: var(--slate-soft); margin-bottom: 32px; }
.legal-page h2 { font-size: 17px; margin: 28px 0 8px; color: var(--ink); }
.legal-page p { font-size: 14.5px; color: var(--slate); line-height: 1.7; margin: 0; }
.legal-page a { color: var(--brass-dark); font-weight: 600; }

/* Responsive */
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 8px; }
  .main-nav { gap: 16px; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .main-nav a { font-size: 13px; }
  .hero-title { font-size: 32px; }
  .hero-illustration { display: none; }
  .search-bar { flex-wrap: wrap; }
  .search-bar input, .search-bar select { border-right: none; border-bottom: 1px solid var(--hairline); width: 100%; }
  .search-bar button { width: 100%; }
  .feed-layout { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}


/* Mega menu dropdown (Browse) */
.nav-item-has-dropdown { position: relative; }
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 8px;
  background: var(--paper-raised); border: 1px solid var(--hairline); border-radius: 8px;
  box-shadow: 0 12px 32px rgba(11,31,58,0.14); padding: 20px; grid-template-columns: 1fr 1fr;
  gap: 24px; min-width: 380px; z-index: 50;
}
.nav-item-has-dropdown::after {
  content: ""; position: absolute; top: 100%; left: 0; height: 10px; width: 100%;
}
.nav-item-has-dropdown:hover .nav-dropdown { display: grid; }
.nav-dropdown-col h5 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--slate-soft); margin: 0 0 10px; }
.nav-dropdown-col ul { list-style: none; margin: 0; padding: 0; }
.nav-dropdown-col li { margin-bottom: 7px; }
.nav-dropdown-col a { font-size: 13.5px; color: var(--slate); text-decoration: none; }
.nav-dropdown-col a:hover { color: var(--brass-dark); text-decoration: underline; }
.nav-dropdown-viewall { grid-column: 1 / -1; border-top: 1px solid var(--hairline); padding-top: 12px; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--brass-dark); text-decoration: none; }
.nav-dropdown-viewall:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .nav-dropdown { display: none !important; }
}

/* Nav badges (Saved / Viewed) */
.nav-badge-link { display: flex; align-items: center; gap: 5px; }
.nav-badge { background: var(--hairline); color: var(--slate-soft); font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; min-width: 16px; text-align: center; }

/* Save button in job modal */
.modal-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.save-btn { background: none; border: 1px solid var(--hairline); border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--slate-soft); cursor: pointer; white-space: nowrap; font-family: var(--font-body); }
.save-btn:hover { border-color: var(--brass); color: var(--brass-dark); }
.save-btn-active { background: var(--brass); border-color: var(--brass); color: var(--paper); }

/* Full footer */
.site-footer-full { border-top: 1px solid var(--hairline); background: var(--paper-raised); padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand p { font-size: 13.5px; color: var(--slate-soft); margin: 14px 0 0; line-height: 1.6; max-width: 260px; }
.footer-brand .logo { margin-bottom: 0; }
.footer-col h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--slate-soft); margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13.5px; color: var(--slate); text-decoration: none; }
.footer-col a:hover { color: var(--brass-dark); text-decoration: underline; }
.footer-bottom { border-top: 1px solid var(--hairline); padding: 18px 0; }
.footer-bottom p { font-size: 12.5px; color: var(--slate-soft); margin: 0; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}
