/*
Theme Name: RAAD Center
Theme URI: https://raadcenter.org
Author: RAAD Center
Author URI: https://raadcenter.org
Description: A responsive WordPress theme for RAAD Center research, publications, insights, events, and academic development content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: raad-center
Tags: custom-menu, featured-images, blog, education, news, accessibility-ready
*/

:root {
  --raad-ink: #0f263f;
  --raad-primary: #123c63;
  --raad-accent: #159c95;
  --raad-accent-soft: #e6f6f4;
  --raad-soft: #f5f8fa;
  --raad-border: #d8e4eb;
  --raad-muted: #607385;
  --raad-white: #ffffff;
  --raad-radius: 8px;
  --raad-shadow: 0 20px 48px rgba(15, 38, 63, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--raad-white);
  color: var(--raad-ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--raad-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(21, 156, 149, 0.35);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--raad-primary);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.16;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 1000;
  border-radius: var(--raad-radius);
  background: var(--raad-primary);
  color: var(--raad-white);
  padding: 0.75rem 1rem;
  font-weight: 700;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(18, 60, 99, 0.1);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.site-header__inner,
.site-footer__inner,
.section-inner {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 190px;
  color: var(--raad-primary);
}

.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(21, 156, 149, 0.35);
  border-radius: 999px;
  background: var(--raad-accent-soft);
  color: var(--raad-primary);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-weight: 800;
}

.brand img,
.custom-logo {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(21, 156, 149, 0.35);
  border-radius: 999px;
  object-fit: cover;
}

.brand__name {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.brand__tagline {
  display: block;
  margin-top: 0.2rem;
  color: var(--raad-muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--raad-border);
  border-radius: var(--raad-radius);
  background: var(--raad-white);
  color: var(--raad-primary);
  padding: 0.65rem 0.8rem;
  font-weight: 800;
}

.primary-nav {
  flex: 1;
  min-width: 0;
}

.primary-menu,
.primary-menu .sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
}

.primary-menu > li {
  position: relative;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-radius: var(--raad-radius);
  padding: 0.55rem 0.72rem;
  color: rgba(15, 38, 63, 0.78);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
  background: rgba(21, 156, 149, 0.1);
  color: var(--raad-primary);
}

.primary-menu .menu-item-has-children > a::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  margin-left: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.primary-menu .sub-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  min-width: 245px;
  border: 1px solid rgba(18, 60, 99, 0.12);
  border-radius: var(--raad-radius);
  background: rgba(255, 255, 255, 0.99);
  box-shadow: var(--raad-shadow);
  padding: 0.45rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.primary-menu .sub-menu a {
  display: flex;
  width: 100%;
  min-height: 40px;
}

.header-cta,
.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--raad-radius);
  background: var(--raad-primary);
  color: var(--raad-white);
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  font-weight: 800;
  transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.header-cta:hover,
.button:hover,
.wp-block-button__link:hover {
  background: #0f3150;
  color: var(--raad-white);
  box-shadow: 0 16px 30px rgba(15, 38, 63, 0.16);
  transform: translateY(-1px);
}

.button--light {
  border: 1px solid var(--raad-border);
  background: var(--raad-white);
  color: var(--raad-primary);
}

.button--light:hover {
  background: var(--raad-accent-soft);
  color: var(--raad-primary);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background:
    linear-gradient(90deg, rgba(15, 38, 63, 0.92), rgba(15, 38, 63, 0.7) 45%, rgba(15, 38, 63, 0.2)),
    url("https://images.unsplash.com/photo-1521737604893-d14cc237f11d?w=1800&q=82") center/cover;
  color: var(--raad-white);
}

.hero .section-inner {
  display: grid;
  align-items: center;
  min-height: 620px;
  padding-block: 6rem 4rem;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: rgba(21, 156, 149, 0.18);
  color: #8df0e7;
  padding: 0.4rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__content {
  max-width: 720px;
}

.hero h1 {
  margin-top: 1.1rem;
  color: var(--raad-white);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.hero p {
  max-width: 650px;
  margin-top: 1.25rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.hero__actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.section {
  padding-block: 5rem;
}

.section--soft {
  background: var(--raad-soft);
}

.section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section__heading h2,
.archive-title {
  font-size: clamp(2rem, 4vw, 3rem);
}

.section__heading p,
.archive-description {
  max-width: 680px;
  color: var(--raad-muted);
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  overflow: hidden;
  border: 1px solid var(--raad-border);
  border-radius: var(--raad-radius);
  background: var(--raad-white);
  box-shadow: 0 12px 32px rgba(15, 38, 63, 0.06);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.card:hover {
  border-color: rgba(21, 156, 149, 0.45);
  box-shadow: var(--raad-shadow);
  transform: translateY(-3px);
}

.card__image {
  aspect-ratio: 16 / 10;
  background: var(--raad-accent-soft);
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.25rem;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  color: var(--raad-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: var(--raad-accent-soft);
  color: var(--raad-primary);
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.card h3 {
  font-size: 1.35rem;
}

.card p {
  margin-top: 0.75rem;
  color: var(--raad-muted);
}

.archive-hero {
  border-bottom: 1px solid var(--raad-border);
  background: var(--raad-soft);
  padding-block: 5rem 3rem;
}

.content-area {
  padding-block: 4rem;
}

.entry {
  width: min(860px, calc(100% - 2rem));
  margin-inline: auto;
}

.entry__hero {
  overflow: hidden;
  border-radius: var(--raad-radius);
  margin-bottom: 2rem;
}

.entry__hero img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-block: 1rem 1.75rem;
  color: var(--raad-muted);
  font-weight: 700;
}

.entry-content {
  color: #29445b;
  font-size: 1.05rem;
}

.entry-content > * + * {
  margin-top: 1.1rem;
}

.entry-content a {
  color: var(--raad-accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.site-footer {
  border-top: 4px solid var(--raad-accent);
  background: var(--raad-primary);
  color: rgba(255, 255, 255, 0.78);
  padding-block: 4rem 2rem;
}

.site-footer h2,
.site-footer h3,
.site-footer .brand__name {
  color: var(--raad-white);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.footer-list a {
  color: rgba(255, 255, 255, 0.72);
}

.footer-list a:hover {
  color: var(--raad-white);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
  font-size: 0.9rem;
}

.not-found {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-header__inner {
    flex-wrap: wrap;
  }

  .header-cta {
    display: none;
  }

  .primary-nav {
    display: none;
    flex-basis: 100%;
    order: 3;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-menu {
    display: grid;
    justify-content: stretch;
    gap: 0.35rem;
    padding-bottom: 1rem;
  }

  .primary-menu a {
    width: 100%;
  }

  .primary-menu .sub-menu {
    position: static;
    display: none;
    min-width: 0;
    margin: 0.15rem 0 0.5rem 0.75rem;
    border: 0;
    background: var(--raad-soft);
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .primary-menu li.is-open > .sub-menu {
    display: block;
  }

  .grid--3,
  .grid--2,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .section__heading {
    display: grid;
  }
}

@media (max-width: 620px) {
  .brand__tagline {
    display: none;
  }

  .hero,
  .hero .section-inner {
    min-height: 560px;
  }

  .section {
    padding-block: 3.5rem;
  }
}
