/*
Theme Name: Z9 Theory
Theme URI: https://z9theory.com
Author: Joshua Christenson
Author URI: https://ublissity.com
Description: Custom theme for Z9 Theory — a discrete flavor symmetry framework for particle physics. Navy + Gold academic design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: z9-theory
Tags: one-column, custom-menu, featured-images, custom-logo
*/

/* ================================================
   Z9 THEORY — Global Styles
   Navy + Gold academic theme
   ================================================ */

:root {
  --navy: #0a1628;
  --navy-light: #132240;
  --navy-mid: #1a3055;
  --navy-surface: #0e1d38;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dim: #8a7a3a;
  --white: #f0f0f0;
  --gray: #8a9bb5;
  --gray-light: #b0bfcf;
  --green: #4caf7c;
  --red: #cf6679;
  --blue-link: #6fa8dc;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background: var(--navy);
  color: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-light); }

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

/* ================================================
   NAVIGATION
   ================================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--navy-mid);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.1em;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-brand .z9-symbol {
  width: 32px;
  height: 32px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links li { list-style: none; }

.nav-links a {
  color: var(--gray);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a {
  color: var(--white);
}

.nav-links .current-menu-item > a::after,
.nav-links .current_page_item > a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold);
}

.nav-cta a,
.menu-item-cta > a {
  background: var(--gold) !important;
  color: var(--navy) !important;
  padding: 8px 18px;
  border-radius: 4px;
  font-weight: 600 !important;
}

.nav-cta a:hover,
.menu-item-cta > a:hover {
  background: var(--gold-light) !important;
  color: var(--navy) !important;
}

/* WordPress menu overrides */
.nav-links .sub-menu { display: none; }
.nav-links li { margin: 0; padding: 0; }

/* Mobile menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.5em;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--navy-mid);
    flex-direction: column;
    padding: 20px 30px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
}

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

.page-content {
  padding-top: 64px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
}

.container-narrow {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 30px;
}

section {
  padding: 80px 0;
}

section + section {
  border-top: 1px solid var(--navy-mid);
}

/* ================================================
   HERO
   ================================================ */

.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 30px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 50% 30%, rgba(201, 168, 76, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 800px;
}

.hero-equation {
  font-family: 'Georgia', serif;
  font-size: 1.2em;
  color: var(--gold-dim);
  letter-spacing: 2px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 3.5em;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -1px;
}

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

.hero .subtitle {
  font-size: 1.25em;
  color: var(--gray-light);
  margin-bottom: 40px;
  font-style: italic;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-bottom: 48px;
}

.hero-stat { text-align: center; }

.hero-stat .number {
  display: block;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 2.4em;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}

.hero-stat .label {
  font-size: 0.85em;
  color: var(--gray);
  margin-top: 4px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ================================================
   BUTTONS
   ================================================ */

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 4px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 600;
  font-size: 0.95em;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--navy);
}

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

.btn-outline:hover {
  background: var(--gold);
  color: var(--navy);
}

.btn-small {
  padding: 10px 22px;
  font-size: 0.85em;
}

/* ================================================
   CARDS
   ================================================ */

.card {
  background: var(--navy-light);
  border: 1px solid var(--navy-mid);
  border-radius: 8px;
  padding: 32px;
  transition: border-color 0.3s, transform 0.2s;
}

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

.card h3 {
  color: var(--gold);
  font-size: 1.15em;
  margin-bottom: 12px;
}

.card p {
  color: var(--gray-light);
  font-size: 0.95em;
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .card-grid-3 { grid-template-columns: 1fr; }
}

/* ================================================
   SECTION HEADERS
   ================================================ */

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header .overline {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 2.2em;
  color: var(--white);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05em;
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ================================================
   PAPER CARDS
   ================================================ */

.paper-card {
  background: var(--navy-light);
  border: 1px solid var(--navy-mid);
  border-radius: 8px;
  padding: 36px;
  margin-bottom: 28px;
  transition: border-color 0.3s;
}

.paper-card:hover { border-color: var(--gold-dim); }

.paper-card .paper-number {
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 8px;
}

.paper-card h3 {
  font-size: 1.35em;
  color: var(--white);
  margin-bottom: 6px;
}

.paper-card .paper-subtitle {
  color: var(--gold-light);
  font-style: italic;
  margin-bottom: 16px;
  font-size: 1em;
}

.paper-card p {
  color: var(--gray-light);
  margin-bottom: 16px;
}

.paper-card .paper-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.paper-card .tag {
  background: var(--navy-mid);
  color: var(--gold-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  font-family: 'Helvetica Neue', sans-serif;
}

/* ================================================
   RESULT TABLE
   ================================================ */

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.92em;
}

.result-table th {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--gold-dim);
  color: var(--gold);
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.result-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--navy-mid);
  color: var(--gray-light);
}

.result-table tr:hover td { background: var(--navy-light); }
.result-table .val { font-family: 'Courier New', monospace; color: var(--white); }
.result-table .match { color: var(--green); font-weight: 600; }

/* ================================================
   QUOTE / CALLOUT
   ================================================ */

.callout {
  background: var(--navy-light);
  border-left: 4px solid var(--gold);
  padding: 24px 28px;
  margin: 30px 0;
  border-radius: 0 6px 6px 0;
}

.callout p {
  font-style: italic;
  color: var(--gold-light);
  font-size: 1.05em;
  margin: 0;
}

.callout .attribution {
  font-style: normal;
  color: var(--gray);
  font-size: 0.85em;
  margin-top: 10px;
}

/* ================================================
   MATH DISPLAY
   ================================================ */

.math-display {
  text-align: center;
  margin: 28px 0;
  padding: 20px;
  background: var(--navy-light);
  border-radius: 6px;
  font-size: 1.25em;
  color: var(--gold-light);
  font-family: 'Georgia', serif;
  overflow-x: auto;
}

/* ================================================
   FOOTER
   ================================================ */

.site-footer {
  border-top: 1px solid var(--navy-mid);
  padding: 50px 0 40px;
  background: var(--navy);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-brand h3 {
  color: var(--gold);
  font-size: 1em;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--gray);
  font-size: 0.85em;
  max-width: 300px;
}

.footer-links h4 {
  color: var(--white);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--gray); font-size: 0.9em; }
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  max-width: 1100px;
  margin: 30px auto 0;
  padding: 20px 30px 0;
  border-top: 1px solid var(--navy-mid);
  text-align: center;
  font-size: 0.8em;
  color: var(--gray);
  font-family: 'Helvetica Neue', sans-serif;
}

.footer-bottom em { color: var(--gold-dim); }

.footer-social ul {
  display: flex;
  gap: 16px;
  list-style: none;
}

.footer-social li { margin-bottom: 0; }

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--navy-mid);
  border-radius: 50%;
  color: var(--gray);
  transition: all 0.2s;
}

.footer-social a:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
}

.footer-social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ================================================
   FORM
   ================================================ */

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85em;
  color: var(--gray);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--navy);
  border: 1px solid var(--navy-mid);
  color: var(--white);
  padding: 12px 16px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1em;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

/* ================================================
   CONTACT PAGE
   ================================================ */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-form button { margin-top: 10px; }

.contact-info-column {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-card {
  background: var(--navy-light);
  border: 1px solid var(--navy-mid);
  border-radius: 8px;
  padding: 28px;
  transition: border-color 0.3s;
}

.contact-card:hover { border-color: var(--gold-dim); }
.contact-card a { color: var(--gold); }
.contact-card a:hover { color: var(--gold-light); }

/* FAQ Section */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.faq-item {
  background: var(--navy-light);
  border: 1px solid var(--navy-mid);
  border-radius: 8px;
  padding: 28px;
  transition: border-color 0.3s, background 0.2s;
}

.faq-item:hover {
  border-color: var(--gold-dim);
  background: var(--navy-mid);
}

.faq-question {
  color: var(--gold);
  font-size: 1.1em;
  margin: 0 0 12px 0;
  cursor: pointer;
  transition: color 0.2s;
}

.faq-item:hover .faq-question { color: var(--gold-light); }

.faq-answer {
  color: var(--gray-light);
  font-size: 0.95em;
  line-height: 1.7;
}

.faq-answer p { margin: 0; }
.faq-answer a { color: var(--gold); }
.faq-answer a:hover { color: var(--gold-light); }

/* ================================================
   BLOG
   ================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.blog-card {
  background: var(--navy-light);
  border: 1px solid var(--navy-mid);
  border-radius: 8px;
  padding: 36px;
  transition: border-color 0.3s, transform 0.2s;
  display: block;
  color: inherit;
  text-decoration: none;
}

.blog-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  color: inherit;
}

.blog-card .blog-meta {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.8em;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.blog-card .blog-tag {
  background: var(--navy-mid);
  color: var(--gold-light);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.9em;
}

.blog-card h3 {
  font-size: 1.35em;
  color: var(--white);
  margin-bottom: 10px;
  transition: color 0.2s;
}

.blog-card:hover h3 { color: var(--gold); }

.blog-card .blog-excerpt {
  color: var(--gray-light);
  font-size: 0.95em;
  margin-bottom: 16px;
}

.blog-card .read-more {
  color: var(--gold);
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.9em;
  font-weight: 600;
}

/* Blog post page */
.post-header {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--navy-mid);
}

.post-header .post-meta {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.85em;
  color: var(--gray);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.post-header .post-tag {
  background: var(--navy-mid);
  color: var(--gold-light);
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.85em;
}

.post-header h1 {
  font-size: 2.2em;
  color: var(--white);
  margin-bottom: 12px;
}

.post-header .post-subtitle {
  font-size: 1.1em;
  color: var(--gray-light);
  font-style: italic;
}

.post-body { font-size: 1.02em; }

.post-body h2 {
  font-size: 1.4em;
  color: var(--gold-light);
  margin: 40px 0 16px;
}

.post-body h3 {
  font-size: 1.15em;
  color: var(--white);
  margin: 30px 0 12px;
}

.post-body p {
  margin-bottom: 18px;
  color: var(--white);
}

.post-body ul, .post-body ol {
  margin: 0 0 18px 24px;
  color: var(--gray-light);
}

.post-body li { margin-bottom: 8px; }
.post-body strong { color: var(--gold-light); }

.post-body .math-display {
  text-align: center;
  margin: 24px 0;
  padding: 18px;
  background: var(--navy-light);
  border-radius: 6px;
  font-size: 1.2em;
  color: var(--gold-light);
  font-family: 'Georgia', serif;
}

.post-body blockquote {
  border-left: 4px solid var(--gold);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--navy-light);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--gold-light);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--navy-mid);
}

.post-nav a {
  color: var(--gold);
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.9em;
}

/* Featured post */
.blog-card.featured {
  border-color: var(--gold-dim);
  position: relative;
}

.blog-card.featured::before {
  content: 'FEATURED';
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--gold);
  color: var(--navy);
  padding: 2px 10px;
  border-radius: 4px;
  font-family: 'Helvetica Neue', sans-serif;
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ================================================
   WORDPRESS OVERRIDES
   ================================================ */

/* Admin bar spacing */
.admin-bar .site-nav { top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-nav { top: 46px; }
}

/* WordPress gallery/image block */
.wp-block-image { margin: 24px 0; }
.wp-block-image img { border-radius: 6px; }

/* WordPress alignment */
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 20px; }
.alignright { float: right; margin-left: 20px; }

/* Gutenberg block editor styles */
.entry-content > * {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1000px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2em; }
  .hero-stats { flex-direction: column; gap: 20px; }
  .hero-stat .number { font-size: 1.8em; }
  section { padding: 50px 0; }
  .section-header h2 { font-size: 1.6em; }
  .footer-inner { flex-direction: column; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .contact-info-column { gap: 20px; }
  .post-header h1 { font-size: 1.6em; }
}
