@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --page: #f6f7fa;
  --surface: #fcfcfd;
  --feature: #e8edfa;
  --ink: #142033;
  --muted: #53627a;
  --line: #d2dbea;
  --cobalt: #2859d4;
  --cobalt-hover: #204ab5;
  --accent-text: #234fbc;
  --on-cobalt: #fcfcfd;
  --selection: #cfdaff;
  --social-icon-filter: brightness(0) saturate(100%);
  --display: "Bodoni Moda", Georgia, serif;
  --sans: "Open Sans", "Avenir Next", sans-serif;
  --radius: 16px;
  --control-radius: 10px;
  --shadow-paper: 0 14px 32px rgb(20 32 51 / 0.12);
  --layer-focus: 10;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #101722;
  --surface: #182232;
  --feature: #1c2c4a;
  --ink: #eef2fa;
  --muted: #b3bfd1;
  --line: #34455e;
  --accent-text: #a7beff;
  --selection: #344e81;
  --social-icon-filter: brightness(0) invert(1);
  --shadow-paper: 0 14px 32px rgb(5 12 24 / 0.35);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #101722;
    --surface: #182232;
    --feature: #1c2c4a;
    --ink: #eef2fa;
    --muted: #b3bfd1;
    --line: #34455e;
    --accent-text: #a7beff;
    --selection: #344e81;
    --social-icon-filter: brightness(0) invert(1);
    --shadow-paper: 0 14px 32px rgb(5 12 24 / 0.35);
  }
}

* { box-sizing: border-box; }
html { background: var(--page); scroll-padding-top: 28px; scrollbar-color: var(--line) var(--page); }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--ink); font: 400 16px/1.65 var(--sans); text-rendering: optimizeLegibility; }
::selection { background: var(--selection); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
button { font: inherit; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -0.035em; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 5px; }
.skip-link { position: fixed; inset: 10px auto auto 16px; z-index: var(--layer-focus); padding: 10px 16px; border-radius: var(--control-radius); background: var(--surface); color: var(--ink); transform: translateY(-170%); }
.skip-link:focus { transform: none; }
.site-header, .profile-layout, .site-footer { width: min(1216px, calc(100% - 96px)); margin-inline: auto; }
.site-header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 700; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--control-radius); background: var(--cobalt); color: var(--on-cobalt); }
.header-tools { display: flex; align-items: center; gap: 24px; }
.domain { font-size: 13px; color: var(--muted); }
.theme-toggle { display: grid; place-items: center; width: 44px; min-width: 42px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: var(--control-radius); color: var(--ink); background: transparent; cursor: pointer; }
.ui-icon { display: inline-block; flex: 0 0 auto; width: 20px; height: 20px; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.icon-arrow { --icon: url("../images/ui/arrow-up-right.svg"); }
.icon-download { --icon: url("../images/ui/download-simple.svg"); }
.theme-icon-moon { --icon: url("../images/ui/moon.svg"); }
.theme-icon-sun { --icon: url("../images/ui/sun.svg"); display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: inline-block; }

.profile-layout { display: grid; grid-template-columns: minmax(0, 304px) minmax(0, 1fr); align-items: start; gap: clamp(48px, 6vw, 88px); padding-block: 48px 72px; }
.profile-panel { display: grid; gap: 22px; min-width: 0; }
.portrait-frame { overflow: hidden; border-radius: 48% 48% 12px 12px; }
.portrait-frame img { width: 100%; aspect-ratio: 1 / 1.04; object-fit: cover; object-position: 50% 44%; }
.profile-heading h1 { font-size: clamp(3.5rem, 5vw, 4.4rem); line-height: 1.03; margin-bottom: 14px; }
.profile-role { font-size: 13px; color: var(--accent-text); font-weight: 700; line-height: 1.65; }
.profile-text { color: var(--muted); font-size: 15px; line-height: 1.8; }
.social-links { display: flex; flex-wrap: wrap; gap: 20px; }
.social-links a { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; font-size: 13px; text-decoration: none; }
.social-links img { width: 17px; height: 17px; filter: var(--social-icon-filter); }
.collection { display: grid; gap: 32px; min-width: 0; }
.links-status { color: var(--muted); font-size: 14px; }
.links-status button { color: var(--ink); background: var(--surface); border: 1px solid var(--line); cursor: pointer; margin-top: 12px; }

.teaching-feature { padding: clamp(28px, 3.5vw, 44px); background: var(--feature); border-radius: var(--radius); }
.teaching-feature h2 { max-width: 12ch; font-size: clamp(2.8rem, 4.5vw, 4rem); line-height: 1.07; margin-bottom: 20px; }
.teaching-feature > p:not(.resource-meta) { max-width: 48ch; font-size: 17px; line-height: 1.7; color: var(--muted); }
.teaching-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; margin-top: 26px; }
.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 48px; padding: 12px 18px; font-size: 13px; font-weight: 700; text-decoration: none; border-radius: var(--control-radius); white-space: nowrap; }
.button-primary { background: var(--cobalt); color: var(--on-cobalt); }
.button-secondary { color: var(--accent-text); padding-inline: 0; }
.resource-meta { color: var(--muted); font-size: 12px; margin-top: 18px; }

.featured-cta-slot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.featured-cta-slot:empty, .featured-cta-slot:not(:has(.featured-cta)) { display: none; }
.featured-cta { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; min-height: 92px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.featured-cta-copy { min-width: 0; }
.featured-cta-copy strong, .featured-cta-copy small { display: block; }
.featured-cta-copy strong { font-size: 15px; font-weight: 700; line-height: 1.5; }
.featured-cta-copy small { margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.featured-cta--video { grid-column: 1 / -1; justify-content: start; min-height: 108px; padding: 24px; background: var(--cobalt); border-color: transparent; color: var(--on-cobalt); }
.featured-cta--video::before { content: ""; width: 34px; height: 34px; flex: 0 0 34px; margin-inline: 4px 6px; background: currentColor; mask: url("../images/ui/play.svg") center / contain no-repeat; }
.featured-cta--video strong { font-size: 21px; }
.featured-cta--video small { color: var(--on-cobalt); font-size: 14px; }
.featured-cta--video .featured-cta-arrow { margin-left: auto; }
.featured-cta-arrow, .resource-arrow { display: block; flex: 0 0 20px; width: 20px; height: 20px; overflow: hidden; font-size: 0; background: currentColor; mask: url("../images/ui/arrow-up-right.svg") center / contain no-repeat; }

.field-guide { display: grid; grid-template-columns: 154px minmax(0, 1fr); gap: 32px; align-items: center; padding: 18px 0 34px; border-bottom: 1px solid var(--line); }
.field-guide-cover { transform: rotate(-3deg); margin: 9px; }
.field-guide-cover img { width: 100%; height: auto; box-shadow: var(--shadow-paper); }
.field-guide h2 { font-size: clamp(2rem, 3vw, 2.6rem); line-height: 1.15; margin-bottom: 14px; }
.field-guide-copy > p:not(.resource-meta) { font-size: 14px; color: var(--muted); line-height: 1.8; }
.text-link { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; font-size: 13px; font-weight: 700; color: var(--accent-text); text-decoration: none; }
.field-guide-download { margin-top: 13px; }
.field-guide .resource-meta { margin-top: 2px; }

.section-heading { margin-bottom: 20px; }
.section-heading h2 { font-size: 2rem; line-height: 1.2; margin-bottom: 10px; }
.section-heading p { color: var(--muted); font-size: 14px; line-height: 1.8; max-width: 62ch; }
.resource-list a { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-width: 0; text-decoration: none; }
.resource-index, .book-number { display: none; }
.resource-copy { min-width: 0; }
.resource-copy strong, .resource-copy small { display: block; }
.resource-copy strong { font-size: 15px; font-weight: 700; line-height: 1.6; }
.resource-copy small { font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 3px; }
.sermon-list { display: grid; gap: 12px; }
.sermon-list a { min-height: 104px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.sermon-list a::before { content: ""; flex: 0 0 30px; width: 30px; height: 30px; background: var(--accent-text); mask: url("../images/ui/play.svg") center / contain no-repeat; }
.sermon-list .resource-copy { margin-right: auto; }
.resources { padding-top: 16px; }
.resources .resource-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
.resources .resource-list a { min-height: 108px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.resources .resource-arrow { color: var(--accent-text); }
.books { padding-top: 16px; }
.book-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.book-copy h3 { font-size: 17px; font-weight: 700; }
.book-copy p { color: var(--muted); font-size: 12px; margin-top: 4px; }
.store-links { display: flex; flex-wrap: wrap; gap: 10px; }
.store-links a { display: inline-flex; min-height: 44px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--control-radius); text-decoration: none; font-size: 12px; }
.store-links span { display: none; }
.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; padding-block: 24px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (hover: hover) {
  .brand:hover, .social-links a:hover, .text-link:hover, .button-secondary:hover { color: var(--accent-text); text-decoration: underline; }
  .theme-toggle:hover { border-color: var(--accent-text); }
  .button-primary:hover, .featured-cta--video:hover { background: var(--cobalt-hover); }
  .featured-cta:not(.featured-cta--video):hover, .sermon-list a:hover { border-color: var(--accent-text); background: var(--feature); }
  .resources .resource-list a:hover strong, .store-links a:hover { color: var(--accent-text); text-decoration: underline; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, button { transition: transform 180ms cubic-bezier(.16, 1, .3, 1); }
  .button-primary:active, .featured-cta:active, .theme-toggle:active { transform: translateY(1px); }
  .resource-arrow, .featured-cta-arrow { transition: transform 180ms cubic-bezier(.16, 1, .3, 1); }
  a:hover > .resource-arrow, a:hover > .featured-cta-arrow { transform: translate(2px, -2px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 1100px) and (min-height: 800px) {
  .profile-panel { position: sticky; top: 32px; }
}
@media (max-width: 1100px) {
  .site-header, .profile-layout, .site-footer { width: calc(100% - 64px); }
  .profile-layout { grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 40px; }
  .profile-heading h1 { font-size: 3.6rem; }
  .teaching-feature { padding: 30px; }
  .teaching-feature h2 { font-size: 3.1rem; }
  .teaching-actions { gap: 8px 16px; }
  .field-guide { grid-template-columns: 128px minmax(0, 1fr); gap: 22px; }
  .featured-cta:not(.featured-cta--video) { padding: 18px; }
  .book-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) and (min-width: 761px) {
  .profile-layout { grid-template-columns: minmax(0, 210px) minmax(0, 1fr); gap: 30px; }
  .profile-heading h1 { font-size: 3.3rem; }
  .profile-role { font-size: 12px; }
  .profile-text { font-size: 14px; }
  .teaching-feature h2 { font-size: 2.7rem; }
  .featured-cta-slot { grid-template-columns: 1fr; }
  .field-guide { grid-template-columns: 100px minmax(0, 1fr); gap: 18px; }
  .field-guide h2 { font-size: 1.9rem; }
  .resources .resource-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-header, .profile-layout, .site-footer { width: calc(100% - 40px); }
  .site-header { min-height: 68px; }
  .domain { display: none; }
  .profile-layout { grid-template-columns: 1fr; gap: 28px; padding-block: 28px 40px; }
  .profile-panel { position: static; grid-template-columns: minmax(0, 1fr) 112px; column-gap: 20px; row-gap: 14px; align-items: center; }
  .portrait-frame { grid-column: 2; grid-row: 1; align-self: stretch; }
  .portrait-frame img { aspect-ratio: auto; width: 100%; height: 100%; min-height: 146px; max-height: 176px; object-fit: cover; }
  .profile-heading { grid-column: 1; grid-row: 1; }
  .profile-heading h1 { font-size: clamp(2.8rem, 12vw, 3.8rem); margin-bottom: 10px; }
  .profile-role { font-size: 11px; line-height: 1.7; }
  .profile-text, .social-links { grid-column: 1 / -1; }
  .profile-text { font-size: 14px; line-height: 1.75; }
  .social-links { gap: 24px; }
  .collection { gap: 24px; }
  .teaching-feature { padding: 26px; }
  .teaching-feature h2 { font-size: clamp(2.35rem, 9vw, 3.6rem); line-height: 1.12; margin-bottom: 15px; }
  .teaching-feature > p:not(.resource-meta) { font-size: 15px; }
  .teaching-actions { align-items: stretch; flex-direction: column; gap: 6px; margin-top: 22px; }
  .button-secondary { justify-content: center; }
  .resource-meta { font-size: 11px; margin-top: 12px; }
  .featured-cta { padding: 16px; gap: 10px; min-height: 86px; }
  .featured-cta-copy strong { font-size: 13px; }
  .featured-cta-copy small { font-size: 11px; }
  .featured-cta--video { padding: 21px 18px; gap: 14px; }
  .featured-cta--video::before { width: 27px; height: 27px; flex-basis: 27px; margin: 0; }
  .featured-cta--video strong { font-size: 18px; }
  .featured-cta--video small { font-size: 12px; }
  .featured-cta:not(.featured-cta--video) .featured-cta-arrow { display: none; }
  .field-guide { grid-template-columns: 108px minmax(0, 1fr); gap: 18px; padding-block: 12px 28px; }
  .field-guide-cover { margin: 4px; }
  .field-guide h2 { font-size: 1.8rem; line-height: 1.17; }
  .field-guide-copy > p:not(.resource-meta) { font-size: 12px; }
  .field-guide-download { font-size: 12px; gap: 6px; flex-wrap: wrap; }
  .field-guide-download .ui-icon { width: 17px; height: 17px; }
  .section-heading h2 { font-size: 1.9rem; }
  .section-heading p { font-size: 13px; }
  .sermon-list a { padding: 20px 16px; gap: 14px; }
  .sermon-list .resource-copy strong { font-size: 14px; }
  .resources { padding-top: 8px; }
  .resources .resource-list { grid-template-columns: 1fr; }
  .resources .resource-list a { min-height: 92px; }
  .site-footer { display: grid; grid-template-columns: 1fr auto; padding-block: 24px; font-size: 11px; gap: 8px; }
  .site-footer p:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .site-footer a { grid-column: 2; grid-row: 1; }
}
@media (max-width: 360px) {
  .profile-panel { grid-template-columns: minmax(0, 1fr) 94px; gap: 14px; }
  .profile-heading h1 { font-size: 2.65rem; }
  .profile-role { font-size: 11px; }
  .teaching-feature { padding: 22px; }
  .teaching-feature h2 { font-size: 2.3rem; }
  .featured-cta-slot { grid-template-columns: 1fr; }
  .field-guide { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; }
  .field-guide h2 { font-size: 1.65rem; }
}
