/* AhnLim Foundation — Institutional Stylesheet (ahnlim.org) */
:root {
  --navy-950: #0b1928;
  --navy-900: #11263c;
  --navy-800: #1c3a57;
  --slate-700: #334e68;
  --slate-600: #486581;
  --slate-500: #627d98;
  --ivory-50: #fbfaf7;
  --ivory-100: #f4f1ea;
  --white: #ffffff;
  --gold-600: #9e7329;
  --gold-500: #b88938;
  --gold-100: #f9f3e6;
  --emerald-700: #1b654e;
  --emerald-50: #edf7f3;
  --border: #e3dfd6;
  --border-strong: #cdc7ba;
  --shadow-sm: 0 2px 8px rgba(11, 25, 40, 0.05);
  --shadow-md: 0 10px 28px rgba(11, 25, 40, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --max-w: 1120px;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--navy-950);
  background-color: var(--ivory-50);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--navy-800);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--gold-600);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
.site-header {
  background: rgba(251, 250, 247, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--navy-950);
}

.brand:hover {
  color: var(--navy-950);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--navy-900);
  color: var(--ivory-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--gold-500);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--slate-600);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font-size: 0.88rem;
  color: var(--navy-900);
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--slate-700);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--navy-950);
  border-bottom-color: var(--gold-500);
}

/* Hero Sections */
.hero {
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  color: var(--ivory-50);
  padding: 5rem 0 4.5rem;
  border-bottom: 3px solid var(--gold-500);
}

.page-hero {
  background: var(--navy-900);
  color: var(--ivory-50);
  padding: 3.5rem 0 3.25rem;
  border-bottom: 2px solid var(--gold-500);
}

.eyebrow {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e6c687;
  margin-bottom: 0.9rem;
}

.eyebrow-dark {
  color: var(--gold-600);
}

.hero h1,
.page-hero h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 1.25rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.05rem);
  max-width: 820px;
}

.page-hero h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  max-width: 780px;
}

.hero-lead {
  font-size: 1.14rem;
  color: #dbe4ee;
  max-width: 700px;
  margin: 0 0 2rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold-500);
  color: var(--navy-950);
  border: 1px solid var(--gold-500);
}

.btn-primary:hover {
  background: #caa04f;
  color: var(--navy-950);
}

.btn-outline-light {
  background: transparent;
  color: var(--ivory-50);
  border: 1px solid rgba(251, 250, 247, 0.4);
}

.btn-outline-light:hover {
  background: rgba(251, 250, 247, 0.1);
  color: var(--white);
}

.btn-secondary {
  background: var(--navy-900);
  color: var(--white);
  border: 1px solid var(--navy-900);
}

.btn-secondary:hover {
  background: var(--navy-800);
  color: var(--white);
}

/* Content Sections */
.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: var(--ivory-100);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  margin: 0 0 0.75rem;
  color: var(--navy-950);
  line-height: 1.28;
}

.section-header p {
  margin: 0;
  color: var(--slate-600);
  font-size: 1.04rem;
}

/* Grid & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  margin: 0 0 0.7rem;
  color: var(--navy-950);
  line-height: 1.32;
}

.card p {
  color: var(--slate-700);
  margin: 0 0 1.15rem;
  font-size: 0.96rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid var(--ivory-100);
  font-size: 0.88rem;
  font-weight: 600;
}

.tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
  align-self: flex-start;
}

.tag-gold {
  background: var(--gold-100);
  color: var(--gold-600);
  border: 1px solid #e7d5b2;
}

.tag-emerald {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border: 1px solid #bfe3d6;
}

/* Status Banner (Grants Mode Toggle) */
.status-banner {
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-left: 5px solid var(--gold-500);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.85rem;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.status-banner.status-open {
  border-left-color: var(--emerald-700);
}

.status-banner h2,
.status-banner h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.3rem;
}

.status-banner p {
  margin: 0;
  color: var(--slate-700);
}

.hidden {
  display: none !important;
}

/* Prose / Educational Guides */
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  margin: 2.3rem 0 0.8rem;
  color: var(--navy-950);
}

.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  margin: 1.75rem 0 0.6rem;
  color: var(--navy-900);
}

.prose p,
.prose li {
  color: var(--slate-700);
  font-size: 1.02rem;
}

.prose ul,
.prose ol {
  padding-left: 1.35rem;
  margin-bottom: 1.4rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.callout {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy-800);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.callout strong {
  color: var(--navy-950);
}

.meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.86rem;
  color: var(--slate-600);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

.breadcrumb a {
  color: #dbe4ee;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Info Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 1.5rem 0;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 0.95rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.info-table th {
  width: 34%;
  background: var(--ivory-100);
  color: var(--navy-950);
  font-weight: 600;
}

.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

/* Footer */
.site-footer {
  background: var(--navy-950);
  color: #cbd6e2;
  padding: 3.5rem 0 2.5rem;
  border-top: 3px solid var(--gold-500);
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-title {
  font-family: var(--font-serif);
  color: var(--white);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.footer-heading {
  color: var(--white);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 0.85rem;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a,
.site-footer a {
  color: #e2e9f0;
  text-decoration: none;
}

.footer-links a:hover,
.site-footer a:hover {
  color: #e6c687;
  text-decoration: underline;
}

.footer-legal {
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  color: #9fb1c4;
}

/* Responsive */
@media (max-width: 860px) {
  .grid-3, .grid-2, .footer-grid {
    grid-template-columns: 1fr;
  }
  .nav-toggle {
    display: inline-block;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--ivory-50);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 1.35rem;
    box-shadow: var(--shadow-md);
  }
  .site-nav.open {
    display: block;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
}

@media print {
  .site-header, .site-footer, .hero-actions {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
