/*
Theme Name: Shepherd Official
Theme URI: https://coreyshepherdofficial.com
Author: Corey Shepherd
Author URI: https://coreyshepherdofficial.com
Description: Official personal site theme for Corey Shepherd — philosopher, mathematician, speaker, veteran, and educator. Dark geometric aesthetic with gold accents.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shepherd-official
Tags: dark, gold, philosophy, mathematics, custom-menu, featured-images, footer-widgets, full-width-template
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Colors */
  --color-bg-deep:       #050d1a;
  --color-bg-mid:        #081222;
  --color-bg-surface:    #0d1a30;
  --color-bg-elevated:   #12213a;
  --color-bg-card:       #0a1628;

  --color-gold:          #c9a84c;
  --color-gold-light:    #e0c070;
  --color-gold-dark:     #a07830;
  --color-gold-muted:    rgba(201, 168, 76, 0.15);
  --color-gold-border:   rgba(201, 168, 76, 0.35);

  --color-text-primary:  #e8e8e8;
  --color-text-muted:    #999999;
  --color-text-faint:    #555555;
  --color-text-inverse:  #050d1a;

  --color-white:         #ffffff;
  --color-black:         #000000;
  --color-border:        rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.15);

  --color-success:       #4caf7d;
  --color-warning:       #f0a830;
  --color-error:         #e05555;
  --color-info:          #5090d0;

  /* Typography */
  --font-display:   'Cinzel', 'Georgia', serif;
  --font-body:      'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:      'Courier New', Courier, monospace;

  /* Font sizes — fluid scale */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-md:    1.125rem;
  --text-lg:    1.25rem;
  --text-xl:    1.5rem;
  --text-2xl:   1.875rem;
  --text-3xl:   2.25rem;
  --text-4xl:   3rem;
  --text-5xl:   3.75rem;
  --text-6xl:   4.5rem;

  /* Font weights */
  --weight-light:   300;
  --weight-regular: 400;
  --weight-semibold:600;
  --weight-bold:    700;

  /* Line heights */
  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-relaxed:1.75;

  /* Letter spacing */
  --tracking-tightest: -0.03em;
  --tracking-tight:    -0.01em;
  --tracking-normal:    0em;
  --tracking-wide:      0.05em;
  --tracking-wider:     0.1em;
  --tracking-widest:    0.2em;

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;
  --space-40:  10rem;

  /* Layout */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1200px;
  --container-2xl:  1400px;
  --container-pad:  var(--space-6);

  /* Borders */
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.5);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.6);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.7);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.8);
  --shadow-gold: 0 0 24px rgba(201, 168, 76, 0.2);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-slower: 600ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index scale */
  --z-below:    -1;
  --z-base:      0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
}

/* ============================================================
   RESET & NORMALIZE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--color-gold-dark) var(--color-bg-mid);
  scrollbar-width: thin;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-deep);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-mid);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gold-dark);
  border-radius: var(--radius-full);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-primary);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  h4 { font-size: var(--text-xl); }
}

@media (min-width: 1200px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
  h3 { font-size: var(--text-3xl); }
}

p {
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: var(--weight-bold);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

blockquote {
  border-left: 3px solid var(--color-gold);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-text-muted);
  background: var(--color-gold-muted);
}

blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-gold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-bg-elevated);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  color: var(--color-gold-light);
}

pre {
  background: var(--color-bg-surface);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  overflow-x: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* Text utilities */
.gold-text {
  color: var(--color-gold);
}

.gold-text-light {
  color: var(--color-gold-light);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-faint {
  color: var(--color-text-faint);
}

.text-primary {
  color: var(--color-text-primary);
}

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.display-font { font-family: var(--font-display); }
.body-font    { font-family: var(--font-body); }

.uppercase { text-transform: uppercase; }
.tracking-wide  { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }
.tracking-widest{ letter-spacing: var(--tracking-widest); }

/* Section label — small gold all-caps label above headings */
.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-4);
  position: relative;
  padding-left: var(--space-8);
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--space-6);
  height: 1px;
  background: var(--color-gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-text-inverse);
  border-color: var(--color-gold);
}

.btn-primary:hover {
  background: var(--color-gold-light);
  border-color: var(--color-gold-light);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.btn-outline:hover {
  background: var(--color-gold-muted);
  color: var(--color-gold-light);
  border-color: var(--color-gold-light);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-strong);
}

.btn-ghost:hover {
  background: var(--color-bg-elevated);
  color: var(--color-gold);
  border-color: var(--color-gold-border);
}

.btn-sm {
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-4) var(--space-10);
  font-size: var(--text-base);
}

.btn-arrow::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.btn-arrow:hover::after {
  transform: translateX(4px);
}

/* Status badges */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  border-radius: var(--radius-full);
  line-height: 1.5;
}

.badge-published {
  background: rgba(76, 175, 125, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(76, 175, 125, 0.3);
}

.badge-submitted {
  background: rgba(201, 168, 76, 0.15);
  color: var(--color-gold);
  border: 1px solid var(--color-gold-border);
}

.badge-editorial {
  background: rgba(80, 144, 208, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(80, 144, 208, 0.3);
}

.badge-preparation {
  background: rgba(153, 153, 153, 0.1);
  color: var(--color-text-muted);
  border: 1px solid rgba(153, 153, 153, 0.2);
}

.badge-forthcoming {
  background: rgba(240, 168, 48, 0.12);
  color: var(--color-warning);
  border: 1px solid rgba(240, 168, 48, 0.25);
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container-sm  { max-width: var(--container-sm); }
.container-md  { max-width: var(--container-md); }
.container-lg  { max-width: var(--container-lg); }
.container-2xl { max-width: var(--container-2xl); }

.section {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
}

@media (min-width: 1200px) {
  .section {
    padding-top: var(--space-32);
    padding-bottom: var(--space-32);
  }
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
.grid-5 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
}

/* Flex */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.items-end    { align-items: flex-end; }
.justify-center      { justify-content: center; }
.justify-between     { justify-content: space-between; }
.justify-end         { justify-content: flex-end; }
.gap-2  { gap: var(--space-2); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }
.gap-12 { gap: var(--space-12); }

/* Spacing utilities */
.mt-0  { margin-top: 0; }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }

/* Visibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   GEOMETRIC ACCENT SHAPES (CSS-only, pseudo-elements)
   ============================================================ */

/* Gold line accent */
.gold-line {
  position: relative;
}

.gold-line::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-gold), transparent);
  margin-top: var(--space-4);
}

.gold-line-center::after {
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

/* Diamond shape */
.geo-diamond {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  transform: rotate(45deg);
}

/* Corner bracket accent */
.geo-corner {
  position: relative;
}

.geo-corner::before,
.geo-corner::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--color-gold);
  border-style: solid;
}

.geo-corner::before {
  top: -4px;
  left: -4px;
  border-width: 2px 0 0 2px;
}

.geo-corner::after {
  bottom: -4px;
  right: -4px;
  border-width: 0 2px 2px 0;
}

/* Geometric triangle accent */
.geo-triangle-right {
  position: relative;
  overflow: hidden;
}

.geo-triangle-right::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 60px 60px 0;
  border-color: transparent var(--color-gold-muted) transparent transparent;
}

/* Angled section divider */
.section-angled {
  position: relative;
  clip-path: polygon(0 0, 100% 3%, 100% 100%, 0 97%);
  padding-top: calc(var(--space-24) + 2vw);
  padding-bottom: calc(var(--space-24) + 2vw);
}

/* Gold accent border card */
.gold-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-gold-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  position: relative;
}

.gold-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gold-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.gold-card:hover::before {
  opacity: 1;
}

/* Geometric hex accent */
.geo-hex {
  width: 40px;
  height: 40px;
  background: var(--color-gold-muted);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  border: 1px solid var(--color-gold-border);
}

/* Decorative cross/plus */
.geo-cross {
  position: relative;
  width: 24px;
  height: 24px;
}

.geo-cross::before,
.geo-cross::after {
  content: '';
  position: absolute;
  background: var(--color-gold);
}

.geo-cross::before {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.geo-cross::after {
  width: 1px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

/* Scan line effect for cards */
.scan-effect {
  position: relative;
  overflow: hidden;
}

.scan-effect::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    transparent 0%,
    rgba(201, 168, 76, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 4px;
  pointer-events: none;
}

/* ============================================================
   SCROLL ANIMATION BASE STATES
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity var(--transition-slower),
    transform var(--transition-slower);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-fade {
  opacity: 0;
  transition: opacity var(--transition-slower);
}

.animate-fade.is-visible {
  opacity: 1;
}

.animate-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity var(--transition-slower),
    transform var(--transition-slower);
}

.animate-slide-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity var(--transition-slower),
    transform var(--transition-slower);
}

.animate-slide-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered children */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 100ms; }
.stagger-children > *:nth-child(3) { transition-delay: 200ms; }
.stagger-children > *:nth-child(4) { transition-delay: 300ms; }
.stagger-children > *:nth-child(5) { transition-delay: 400ms; }
.stagger-children > *:nth-child(6) { transition-delay: 500ms; }
.stagger-children > *:nth-child(7) { transition-delay: 600ms; }
.stagger-children > *:nth-child(8) { transition-delay: 700ms; }

/* ============================================================
   SKIP TO CONTENT
   ============================================================ */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-6);
  background: var(--color-gold);
  color: var(--color-text-inverse);
  font-weight: var(--weight-bold);
  border-radius: var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: var(--space-4);
  color: var(--color-text-inverse);
}

/* ============================================================
   WORDPRESS CORE CLASSES
   ============================================================ */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  font-style: italic;
}

.alignleft  { float: left; margin-right: var(--space-6); margin-bottom: var(--space-4); }
.alignright { float: right; margin-left: var(--space-6); margin-bottom: var(--space-4); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide  { width: 100%; }
.alignfull  { width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .nav-toggle {
    display: none;
  }
}
