/* partiallyqualified.css — Single stylesheet for Partially Qualified blog */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === CSS VARIABLES === */
:root {
  --cream:       oklch(97% 0.012 85);
  --cream-mid:   oklch(93% 0.014 80);
  --ink:         oklch(18% 0.01 250);
  --ink-mid:     oklch(38% 0.01 250);
  --ink-light:   oklch(58% 0.008 250);
  --olive:       oklch(42% 0.07 145);
  --olive-light: oklch(55% 0.07 145);
  --dark-bar:    oklch(14% 0.008 250);
  --rule:        oklch(85% 0.01 80);
}

/* === TYPOGRAPHY BASE === */
body {
  font-family: 'Newsreader', Georgia, serif;
  background: var(--cream);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === LAYOUT UTILITIES === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* === SECTION RULE === */
.section-rule {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}
.section-rule__label {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  white-space: nowrap;
}
.section-rule__line {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* === HEADER === */
.site-utility-bar {
  background: var(--dark-bar);
  padding: 8px 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 28px;
}
.site-utility-bar__link {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 12px;
  color: oklch(62% 0.008 250);
  letter-spacing: 0.04em;
  transition: color 0.15s;
}
.site-utility-bar__link:hover { color: #fff; }
.navbar__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: oklch(62% 0.008 250);
}
.navbar__toggle:hover { color: #fff; }
.site-masthead {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding: 28px 40px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.site-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
  transition: color 0.15s;
}
.site-name:hover { color: var(--olive); }
.site-tagline {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--ink-light);
  letter-spacing: 0.01em;
  text-align: center;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 12px;
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  width: 100%;
  justify-content: center;
}
.site-nav__link {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 14px;
  color: var(--ink-mid);
  letter-spacing: 0.03em;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.site-nav__link:hover { color: var(--olive); }
.site-nav__link--active { color: var(--ink); border-bottom-color: var(--olive); }

/* === FOOTER === */
.site-footer {
  background: var(--dark-bar);
  color: oklch(55% 0.008 250);
  padding: 52px 40px 24px;
  margin-top: 80px;
}
.footer__grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid oklch(24% 0.008 250);
  margin-bottom: 20px;
}
.footer__brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: oklch(88% 0.008 250);
  margin-bottom: 10px;
  display: block;
}
.footer__brand-tagline {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 13px;
  color: oklch(45% 0.008 250);
  line-height: 1.6;
}
.footer__col-label {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(48% 0.008 250);
  margin-bottom: 14px;
  display: block;
}
.footer__link {
  display: block;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 13px;
  color: oklch(55% 0.008 250);
  margin-bottom: 9px;
  transition: color 0.15s;
}
.footer__link:hover { color: oklch(85% 0.008 250); }
.footer__copy {
  max-width: 1100px;
  margin: 0 auto;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 12px;
  color: oklch(38% 0.008 250);
  text-align: center;
}

/* === PAGE BANNER === */
.page-banner {
  background: var(--cream-mid);
  border-bottom: 1px solid var(--rule);
  padding: 56px 40px 48px;
  text-align: center;
}
.page-banner__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 10px;
}
.page-banner__subtitle {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink-mid);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* === ARTICLE CARD === */
.article-card {
  background: var(--cream);
  display: flex;
  flex-direction: column;
}
.article-card__image {
  background: var(--cream-mid);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 16px;
}
.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.article-card:hover .article-card__image img { transform: scale(1.03); }
.article-card__image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--cream-mid);
}
.article-card__category {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 8px;
  display: block;
}
.article-card__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.article-card:hover .article-card__title { color: var(--olive); }
.article-card__excerpt {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 13.5px;
  color: var(--ink-mid);
  line-height: 1.65;
  margin-bottom: 12px;
  flex: 1;
}
.article-card__meta {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 11.5px;
  color: var(--ink-light);
}

/* === HOME — FEATURED === */
.featured-wrap {
  padding: 40px 0 52px;
}
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule);
  background: #fff;
  overflow: hidden;
}
.featured__image {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  background: var(--cream-mid);
}
.featured__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.featured:hover .featured__image img { transform: scale(1.03); }
.featured__image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 320px;
  background: linear-gradient(135deg, var(--cream-mid), oklch(88% 0.018 90));
}
.featured__body {
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.featured__category {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 14px;
  display: block;
}
.featured__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  transition: color 0.15s;
}
.featured:hover .featured__title { color: var(--olive); }
.featured__excerpt {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 15px;
  color: var(--ink-mid);
  line-height: 1.7;
  margin-bottom: 28px;
  flex: 1;
}
.featured__meta {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 12px;
  color: var(--ink-light);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.featured__meta-sep { color: var(--rule); }

/* === HOME — ARTICLE GRID === */
.articles-section {
  padding-bottom: 52px;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.articles-grid .article-card {
  background: var(--cream);
  padding: 24px 22px;
}

/* === HOME — PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}
.pagination__link,
.pagination__current {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 14px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  color: var(--ink-mid);
  transition: background 0.15s, color 0.15s;
}
.pagination__link:hover {
  background: var(--cream-mid);
  color: var(--olive);
  border-color: var(--olive);
}
.pagination__current {
  background: var(--olive);
  color: var(--cream);
  border-color: var(--olive);
}

/* === ARTICLE — HERO === */
.article-hero {
  position: relative;
  height: clamp(320px, 45vw, 480px);
  overflow: hidden;
  background: var(--dark-bar);
}
.article-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 55%, transparent 100%);
}
.article-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: 900px;
  padding: 40px 60px;
}
.article-hero--no-image {
  height: auto;
  position: static;
}
.article-hero--no-image .article-hero__content {
  position: static;
  padding: 56px 60px 48px;
  max-width: 860px;
}
.article-hero__category {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(78% 0.09 145);
  margin-bottom: 12px;
  display: block;
}
.article-hero__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.7rem, 3.5vw, 2.7rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.article-hero__meta {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 13px;
  color: oklch(68% 0.008 250);
}

/* === ARTICLE — BODY & PROSE === */
.article-body-wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 52px 40px 80px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 60px;
  align-items: start;
}
.article-prose {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink-mid);
}
.article-prose p { margin-bottom: 1.5em; }
.article-prose p:first-child {
  font-size: 18.5px;
  color: var(--ink);
  font-weight: 500;
  font-style: italic;
  line-height: 1.65;
}
.article-prose h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 2em 0 0.75em;
  line-height: 1.2;
}
.article-prose h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 1.6em 0 0.6em;
}
.article-prose blockquote {
  border-left: 3px solid var(--olive);
  margin: 1.8em 0;
  padding: 4px 0 4px 24px;
  font-style: italic;
  color: var(--ink-mid);
}
.article-prose a { color: var(--olive); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article-prose a:hover { color: var(--olive-light); }
.article-prose ul, .article-prose ol { margin: 1em 0 1.4em 1.6em; }
.article-prose li { margin-bottom: 0.4em; list-style: disc; }
.article-prose ol li { list-style: decimal; }
.article-prose img { margin: 2em auto; border: 1px solid var(--rule); }
.article-prose hr { border: none; border-top: 1px solid var(--rule); margin: 2.5em 0; }
.article-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 15px;
  line-height: 1.55;
}
.article-prose th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-mid);
  background: var(--cream-mid);
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
}
.article-prose td {
  padding: 10px 14px;
  color: var(--ink-mid);
  border-bottom: none;
  vertical-align: middle;
}
.article-prose tbody tr:nth-child(even)  td { background: var(--cream); }
.article-prose tbody tr:nth-child(odd) td { background: var(--cream-mid); }
.article-prose tbody tr:hover td { background: oklch(90% 0.02 145); }

/* === ARTICLE — SIDEBAR === */
.article-sidebar { position: sticky; top: 24px; }
.sidebar__label {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 16px;
  display: block;
}
.sidebar__item {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}
.sidebar__item-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.sidebar__item:hover .sidebar__item-title { color: var(--olive); }
.sidebar__item-meta {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 11.5px;
  color: var(--ink-light);
}

/* === CONTACT FORM === */
.contact-wrap {
  max-width: 640px;
  margin: 52px auto 80px;
  padding: 0 40px;
}
.form-group { margin-bottom: 22px; }
.form-label {
  display: block;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 13px;
  color: var(--ink-mid);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 10px 14px;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.form-control:focus { border-color: var(--olive); }
textarea.form-control { resize: vertical; min-height: 140px; }
.btn-submit {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--olive);
  color: var(--cream);
  border: none;
  padding: 12px 32px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-submit:hover:not(:disabled) { background: var(--olive-light); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* === ALERTS === */
#formMessage { margin-bottom: 20px; }
.alert-success, .alert-error {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 14px;
  padding: 12px 16px;
  border-left: 3px solid;
}
.alert-success { background: oklch(95% 0.05 145); border-color: var(--olive); color: oklch(30% 0.07 145); }
.alert-error   { background: oklch(96% 0.04 30);  border-color: oklch(55% 0.15 30); color: oklch(30% 0.12 30); }

/* === LEGAL PAGES === */
.legal-content {
  max-width: 740px;
  margin: 52px auto 80px;
  padding: 0 40px;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-mid);
}
.legal-content h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 2.5em 0 0.75em;
}
.legal-content p { margin-bottom: 1.3em; }
.legal-content a { color: var(--olive); text-decoration: underline; }

/* === RESPONSIVE === */

/* 960px — article sidebar drops below, home grid → 2 col */
@media (max-width: 960px) {
  .article-body-wrap {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 40px 24px 60px;
  }
  .article-sidebar {
    position: static;
    border-top: 1px solid var(--rule);
    padding-top: 32px;
    margin-top: 40px;
  }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-hero__content { padding: 32px 36px; }
  .article-hero--no-image .article-hero__content { padding: 44px 36px 40px; }
}

/* 768px — featured → stacked, footer → 2 col, container reduces padding */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .site-utility-bar { padding: 8px 24px; }
  .site-masthead { padding: 22px 24px 18px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .site-masthead .site-tagline { width: 100%; text-align: left; }
  .featured { grid-template-columns: 1fr; }
  .featured__image { min-height: 220px; height: 220px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .site-footer { padding: 40px 24px 20px; margin-top: 52px; }
  .contact-wrap { padding: 0 24px; margin: 40px auto 60px; }
  .legal-content { padding: 0 24px; margin: 40px auto 60px; }

  /* Mobile nav */
  .navbar__toggle { display: flex; align-items: center; }
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-top: none;
    padding-top: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
    padding: 0 24px;
    width: 100%;
    margin-top: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav__link {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid var(--rule);
    border-left: none;
  }
}

/* 480px — single column everywhere */
@media (max-width: 480px) {
  .articles-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .article-hero__content,
  .article-hero--no-image .article-hero__content { padding: 28px 24px; }
  .page-banner { padding: 40px 24px 36px; }
}
