/*
Theme Name: Rod Graham
Theme URI: https://roderickgraham.com/
Author: Roderick Graham
Description: A focused academic portfolio theme with a black foundation and gold, royal blue, and silver accents.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: rod-graham
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --rg-black: #050505;
  --rg-panel: #0a0b0e;
  --rg-panel-light: #111319;
  --rg-gold: #d4af37;
  --rg-blue: #4169e1;
  --rg-silver: #bfc3c9;
  --rg-silver-muted: #858b94;
  --rg-ivory: #f3f0e8;
  --rg-border: rgba(191, 195, 201, 0.42);
  --rg-content: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--rg-ivory);
  background: var(--rg-black);
  font-family: Ubuntu, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

body.admin-bar .site-header {
  top: 32px;
}

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

a {
  color: var(--rg-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--rg-gold);
  outline-offset: 4px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 12px 16px;
  clip: auto;
  color: var(--rg-black);
  background: var(--rg-gold);
  font-weight: 500;
}

.site-shell {
  width: min(calc(100% - 40px), var(--rg-content));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--rg-border);
  background: rgba(5, 5, 5, 0.96);
}

.site-header__inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-branding {
  flex: 0 0 auto;
}

.site-title {
  color: var(--rg-ivory);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.site-title:hover {
  color: var(--rg-gold);
}

.menu-toggle {
  min-width: 46px;
  min-height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rg-border);
  border-radius: 0;
  color: var(--rg-ivory);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  width: 20px;
  height: 2px;
  display: block;
  background: currentColor;
}

.menu-toggle__bars {
  position: relative;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
  position: absolute;
  left: 0;
  content: "";
}

.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }

.primary-navigation ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.primary-navigation a {
  display: block;
  padding-block: 0.75rem;
  color: var(--rg-silver);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a,
.primary-navigation .current_page_item > a,
.home .primary-navigation li:first-child > a {
  color: var(--rg-gold);
}

.rg-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
  min-height: 560px;
  padding-block: clamp(4rem, 9vw, 7rem);
}

.rg-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--rg-blue);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.rg-kicker::before {
  width: 36px;
  height: 2px;
  flex: 0 0 auto;
  background: var(--rg-gold);
  content: "";
}

.rg-hero h1 {
  max-width: 760px;
  margin: 0 0 1.5rem;
  color: var(--rg-ivory);
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.rg-hero h1 .accent {
  color: var(--rg-gold);
}

.rg-intro {
  max-width: 670px;
  margin: 0;
  color: var(--rg-silver);
  font-size: 1.075rem;
}

.rg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.rg-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--rg-silver);
  color: var(--rg-ivory);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.rg-button:hover {
  border-color: var(--rg-gold);
  color: var(--rg-black);
  background: var(--rg-gold);
}

.rg-button--primary {
  border-color: var(--rg-blue);
  background: var(--rg-blue);
}

.rg-portrait {
  position: relative;
  min-height: 360px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--rg-silver);
  background: linear-gradient(145deg, var(--rg-panel-light), var(--rg-black));
}

.rg-portrait__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rg-monogram {
  color: rgba(191, 195, 201, 0.42);
  font-size: clamp(5rem, 12vw, 7.5rem);
  font-weight: 500;
  letter-spacing: -0.09em;
}

.rg-portrait__caption {
  position: absolute;
  right: 1.125rem;
  bottom: 1rem;
  left: 1.125rem;
  z-index: 2;
  padding: 0.75rem 0.25rem 0;
  border-top: 2px solid var(--rg-gold);
  color: var(--rg-ivory);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-shadow: 0 1px 8px #000;
}

.rg-keywords {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--rg-border);
  border-bottom: 1px solid var(--rg-border);
  background: #080808;
}

.rg-keyword {
  min-height: 88px;
  display: grid;
  place-items: center;
  padding: 1rem 0.75rem;
  color: var(--rg-silver);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.rg-keyword + .rg-keyword {
  border-left: 1px solid rgba(191, 195, 201, 0.3);
}

.rg-keyword:nth-child(1),
.rg-keyword:nth-child(4) { color: var(--rg-gold); }
.rg-keyword:nth-child(2),
.rg-keyword:nth-child(5) { color: var(--rg-blue); }

.rg-pathways {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.rg-section-label {
  margin: 0 0 1.5rem;
  color: var(--rg-silver);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.rg-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.125rem;
}

.rg-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5rem;
  border: 1px solid rgba(191, 195, 201, 0.55);
  color: var(--rg-silver);
  background: var(--rg-panel);
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.rg-card:nth-child(2) { border-top-color: var(--rg-blue); }
.rg-card:nth-child(3) { border-top-color: var(--rg-gold); }

.rg-card:hover {
  transform: translateY(-3px);
  border-color: var(--rg-gold);
  color: var(--rg-silver);
  background: var(--rg-panel-light);
}

.rg-card svg {
  width: 34px;
  height: 34px;
  color: var(--rg-blue);
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
}

.rg-card:nth-child(3) svg { color: var(--rg-gold); }

.rg-card__title {
  color: var(--rg-ivory);
  font-size: 1.25rem;
  font-weight: 500;
}

.entry-shell {
  width: min(calc(100% - 40px), 820px);
  margin-inline: auto;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.entry-header {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rg-border);
}

.entry-title {
  margin: 0;
  color: var(--rg-ivory);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.entry-meta {
  margin-top: 0.75rem;
  color: var(--rg-silver-muted);
  font-size: 0.875rem;
}

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--rg-ivory);
  font-weight: 500;
  line-height: 1.25;
}

.entry-content h2 { margin-top: 2.5rem; font-size: 1.8rem; }
.entry-content h3 { margin-top: 2rem; font-size: 1.4rem; }
.entry-content p,
.entry-content li { color: var(--rg-silver); }

.entry-content blockquote {
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin-inline: 0;
  border-left: 3px solid var(--rg-gold);
  color: var(--rg-ivory);
}

.entry-content hr {
  border: 0;
  border-top: 1px solid var(--rg-border);
}

.entry-content input,
.entry-content textarea,
.entry-content select {
  max-width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--rg-border);
  border-radius: 0;
  color: var(--rg-ivory);
  background: var(--rg-panel);
  font: inherit;
}

.post-list {
  display: grid;
  gap: 2.25rem;
}

.post-summary {
  padding-bottom: 2.25rem;
  border-bottom: 1px solid var(--rg-border);
}

.post-summary__title {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  line-height: 1.2;
}

.post-summary__title a {
  color: var(--rg-ivory);
  text-decoration: none;
}

.post-summary__title a:hover { color: var(--rg-gold); }

.navigation.pagination {
  margin-top: 2.5rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-numbers {
  min-width: 42px;
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--rg-border);
  text-decoration: none;
}

.page-numbers.current {
  color: var(--rg-black);
  border-color: var(--rg-gold);
  background: var(--rg-gold);
}

.site-footer {
  border-top: 1px solid var(--rg-border);
  color: var(--rg-silver-muted);
  background: #080808;
}

.site-footer__inner {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 0.875rem;
}

.site-footer__mark {
  color: var(--rg-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.alignwide {
  width: min(100%, 1080px);
  max-width: 1080px;
  margin-right: 50%;
  margin-left: 50%;
  transform: translateX(-50%);
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-right: 50%;
  margin-left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 980px) {
  .rg-hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.62fr);
    gap: 2.25rem;
  }

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

  .rg-keyword:nth-child(4) {
    border-left: 0;
  }

  .rg-keyword:nth-child(n + 4) {
    border-top: 1px solid rgba(191, 195, 201, 0.3);
  }
}

@media (max-width: 760px) {
  body.admin-bar .site-header { top: 46px; }

  .site-shell {
    width: min(calc(100% - 30px), var(--rg-content));
  }

  .site-header__inner {
    min-height: 72px;
    flex-wrap: wrap;
    padding-block: 0.75rem;
  }

  .menu-toggle { display: inline-flex; }

  .primary-navigation {
    width: 100%;
    display: none;
    padding: 0.25rem 0 0.75rem;
  }

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

  .primary-navigation ul {
    display: grid;
    gap: 0;
  }

  .primary-navigation a {
    padding: 0.75rem 0;
    border-top: 1px solid rgba(191, 195, 201, 0.22);
  }

  .rg-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    min-height: 0;
    padding-block: 3.5rem;
  }

  .rg-hero h1 {
    font-size: clamp(2.55rem, 13vw, 4rem);
  }

  .rg-portrait { min-height: 400px; }

  .rg-keywords,
  .rg-card-grid {
    grid-template-columns: 1fr;
  }

  .rg-keyword + .rg-keyword {
    border-top: 1px solid rgba(191, 195, 201, 0.3);
    border-left: 0;
  }

  .rg-card { min-height: 145px; }

  .site-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

